delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/05/11:32:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3CADD172.6361449@hack.kampbjorn.com>
Date: Fri, 05 Apr 2002 18:31:46 +0200
From: Hack =?iso-8859-1?Q?Kampbj=F8rn?= <cygwin AT hack DOT kampbjorn DOT com>
Reply-To: Cygwin <Cygwin AT cygwin DOT com>
X-Accept-Language: en,da,es,ca
MIME-Version: 1.0
To: Cygwin <Cygwin AT cygwin DOT com>
CC: Alan Dobkin <Alan AT adobkin DOT net>
Subject: Re: NcFTP Feature Request for "getline" (fwd)
References: <3CAA6462 DOT 3020703 AT ece DOT gatech DOT edu> <2523706307.1017786727@[192.168.70.5]> <3CAA8F31 DOT 7040406 AT ece DOT gatech DOT edu>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019