From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16850 invoked from network); 2 Jul 1999 17:05:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jul 1999 17:05:05 -0000 Received: (qmail 1569 invoked by alias); 2 Jul 1999 17:04:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6953 Received: (qmail 1532 invoked from network); 2 Jul 1999 17:04:35 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: _cd MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 03 Jul 1999 02:04:28 +0900 Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.3.11 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) I think that the completion code for pushd [-+] is also useful with cd. --- Completion/Builtins/_cd- Sat Jul 3 01:55:59 1999 +++ Completion/Builtins/_cd Sat Jul 3 01:56:50 1999 @@ -5,7 +5,7 @@ # and the string doesn't begin with ~, /, ./ or ../. # - In the second argument to cd for the form `cd old new', completes # possible `new' strings by examining `old' and $PWD. -# - After pushd - or pushd +, completes numbers, but the listing +# - After - or +, completes numbers, but the listing # gives you the list of directories to complete. This turns on # menu-completion and lists the possibilities automatically, otherwise # it's not a lot of use. If you don't type the + or - it will @@ -25,7 +25,7 @@ # Now remove all the common parts of $PWD and the completions from this rep=(${${rep#${PWD%%$words[2]*}}%${PWD#*$words[2]}}) (( ! $#rep )) || compadd $rep -elif [[ $words[1] = pu* && $PREFIX = [-+]* ]]; then +elif [[ $PREFIX = [-+]* ]]; then # pushd: just complete the numbers, but show the full directory list with # numbers. # For - we do the same thing, but reverse the numbering (other -- Tanaka Akira