delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/30/10:10:34

X-Spam-Check-By: sourceware.org
Date: Tue, 30 Jan 2007 10:10:05 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Jared Silva <jayrod AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: /etc/bash_completion & svn/svk completion
In-Reply-To: <a34988160701300649y69da3598yed2374196a99dc7@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0701301004180.13281@access1.cims.nyu.edu>
References: <a34988160701291214t1bcd0c01u2979ccb4ca5e8904 AT mail DOT gmail DOT com> <45BEC132 DOT 6000006 AT byu DOT net> <a34988160701300649y69da3598yed2374196a99dc7 AT mail DOT gmail DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On Tue, 30 Jan 2007, Jared Silva wrote:

> Eric Blake wrote:
> > You can also try debugging it yourself.  At the command line, turn on
> > the options 'set -xv', then when you hit TAB, you will see what bash
> > is trying to do during the tab completion.  I don't personally use
> > svn, so I'm not the best candidate to help you fix the _svn() helper
> > function used when tab-completing svn, but compgen is loaded with
> > options to try to help decipher when to use directories with or
> > without a trailing slash.
>
> Any idea what this means?

I would imagine the significant differences are:

> $ svn update Con<TAB>
> [snip]
> + _filedir
> [snip]
> + COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" ) $( compgen -d -- "$cur" ))
                                            ^^
> [snip]

and

> Here is "cd", which works.
>
> $ cd Con<TAB>
> [snip]
> + _filedir -d
             ^^
> [snip]
> + COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- $cur ))
                                            ^^
You'll need to look at the actual scripts to figure out why one Config is
detected as a directory in one case, but not another.

FWIW, I don't know about svn, but with cvs, adding a trailing slash causes
"cvs update" to behave in unexpected ways.  It could be that the cvs
completion mode was written with that in mind, and the svn mode simply
copied the cvs code...  Just a WAG.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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