This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NcFTP Feature Request for "getline" (fwd)


Charles Wilson wrote:
> 
> The interesting thing is, as of 3.1.2 and 3.1.3, cygwin ncftp uses the
> readline library for terminal handling -- just like bash does.  Prior to
> 3.1.2, cygwin ncftp used the home-grown termhandling stuff internal to
> the ncftp codebase.  You'd think that would be an improvement -- and
> that it would work the same as bash.

As I advocated for using the readline patch I'm glad to say that this
lack of quoting bookmarks seems to be by design and ncftp's own getline
doesn't quote bookmarks either (at least on cygwin). Only files and
directories (local or remote) are quoted.
> 
> The way readline works, you call rl_completion_matches() and it returns
> a different match each time you call it -- internally, it calls a custom
>   'completion generator function' whose address you store in the
> function pointer rl_completion_entry_function (if NULL, readline uses a
> default file iterator).  Perhaps the completion generator function that
> ncftp stores in rl_completion_entry_function is buggy?
> 
> Anyway, as of yesterday I'm not maintaining ncftp anymore -- Hack
> Kampbjørn has agreed to take over.  However, I'm not going anywhere --
> and this IS a community project...

Ehhh, wait a minute, I thought we agreed that I would take over from the
next upstream ncftp release, and that we would coordinate any extra
3.1.3 cygwin release if they where needed.

> 
> all together now:
> 
> patches gratefully accepted. :-)

Well, here is one then (even that bookmarks are not really filenames it
seems to work) if somebody wants to try it out I've uploaded it as a
package 8-)
http://hackdata.com/cygwin/ncftp/ncftp-3.1.3-1a.tar.bz2
http://hackdata.com/cygwin/ncftp/ncftp-3.1.3-1a-src.tar.bz2

--- ncftp/readln.c-orig       Fri Apr  5 18:17:29 2002
+++ ncftp/readln.c    Fri Apr  5 18:15:07 2002
@@ -652,6 +652,14 @@
                cp = RemoteDirCompletionFunction(text, state);
                return cp;
        } else if ((flags & kCompleteBookmark) != 0) {
+#ifdef HAVE_LIBREADLINE
+#if (HAVE_LIBREADLINE >= 210)
+               rl_filename_quoting_desired = 1;
+#endif
+               rl_filename_completion_desired = 1;
+#else
+               gl_filename_quoting_desired = 1;
+#endif
                cp = BookmarkCompletionFunction(text, state);
                return cp;
        } else if ((flags & kCompletePrefOpt) != 0) {

> 
> --Chuck
> 
> <skipped a lot of discussion about TAB completion for bookmarks with spaces/>
-- 
Med venlig hilsen / Kind regards

Hack Kampbjørn

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]