This is the mail archive of the cygwin 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: /etc/bash_completion & svn/svk completion


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@cs.nyu.edu | igor@watson.ibm.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/


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