delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/30/09:49:49

X-Spam-Check-By: sourceware.org
Message-ID: <a34988160701300649y69da3598yed2374196a99dc7@mail.gmail.com>
Date: Tue, 30 Jan 2007 09:49:23 -0500
From: "Jared Silva" <jayrod AT gmail DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: /etc/bash_completion & svn/svk completion
In-Reply-To: <45BEC132.6000006@byu.net>
MIME-Version: 1.0
References: <a34988160701291214t1bcd0c01u2979ccb4ca5e8904 AT mail DOT gmail DOT com> <45BEC132 DOT 6000006 AT byu DOT net>
X-IsSubscribed: yes
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

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?

$ svn update Con+ local cur prev commands options command
+ COMPREPLY=()
+ cur=Con
+ commands='add blame praise annotate ann cat checkout co cleanup commit \
                ci copy cp delete del remove rm diff di export help ? h import \
                info list ls lock log merge mkdir move mv rename ren \
                propdel pdel pd propedit pedit pe propget pget pg \
                proplist plist pl propset pset ps resolved revert \
                status stat st switch sw unlock update up'
+ [[ 2 -eq 1 ]]
+ prev=update
+ case $prev in
+ command=update
+ [[ Con == -* ]]
+ [[ update == @(help|h|\?) ]]
+ _filedir
+ local 'IFS=
' xspec
+ _expand
+ '[' Con '!=' Con ']'
+ [[ Con == \~*/* ]]
+ [[ Con == \~* ]]
+ '[' '' = -d ']'
+ xspec=
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" )
$( compgen -d -- "$cur" ))
 compgen -f -X "$xspec" -- "$cur"
++ compgen -f -X '' -- Con
 compgen -d -- "$cur"
++ compgen -d -- Con
+ return 0
fig

Here is "cd", which works.

$ cd Con+ local 'IFS=
' cur=Con i j k
+ [[ Con == ?(\\)\$* ]]
+ '[' -z '' ']'
+ _filedir -d
+ local 'IFS=
' xspec
+ _expand
+ '[' Con '!=' Con ']'
+ [[ Con == \~*/* ]]
+ [[ Con == \~* ]]
+ '[' -d = -d ']'
+ COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- $cur ))
 compgen -d -- $cur
++ compgen -d -- Con
+ return 0
+ return 0
fig/

--
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