From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21357 invoked from network); 19 Mar 1999 11:03:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Mar 1999 11:03:50 -0000 Received: (qmail 21163 invoked by alias); 19 Mar 1999 11:03:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5862 Received: (qmail 21110 invoked from network); 19 Mar 1999 11:03:25 -0000 Date: Fri, 19 Mar 1999 12:03:23 +0100 (MET) Message-Id: <199903191103.MAA01592@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Fri, 19 Mar 1999 12:59:51 +0300 Subject: PATCH: RE: _path_files and _cd with explicit glob pattern Andrej Borsenkow wrote: > Ehem ... cd first looks in the current directory. So > > bor@itsrm2:~/test%> ls -l cd > total 0 > drwxr-xr-x 2 bor sinix 96 Mar 19 12:55 foo > bor@itsrm2:~/test%> echo $cdpath > /home/bor/test/cd > bor@itsrm2:~/test%> cd c/*oTAB > Beeps, but > bor@itsrm2:~/test%> cd cd/foo > bor@itsrm2:~/test/cd/foo%> > > So, it looks, like cd completion ignores current directory Right. The patch fixes also a little problem I just stumbled over in `_path_files' (it was too eager to switch on menu-behavior). Bye Sven diff -u oc/Builtins/_cd Completion/Builtins/_cd --- oc/Builtins/_cd Mon Mar 15 10:08:49 1999 +++ Completion/Builtins/_cd Fri Mar 19 11:59:54 1999 @@ -59,7 +59,7 @@ return ret elif [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then - _path_files -W cdpath -/ + _path_files -W "(. $cdpath)" -/ else _path_files -/ fi diff -u oc/Core/_path_files Completion/Core/_path_files --- oc/Core/_path_files Mon Mar 15 12:51:38 1999 +++ Completion/Core/_path_files Fri Mar 19 11:57:25 1999 @@ -111,7 +111,7 @@ [[ $compstate[insert] = *menu || -n "$_comp_correct" || ( $#compstate[pattern_match] -ne 0 && - "$orig" != "${orig:q}" ) ]] && menu=yes + "${orig#\~}" != "${${orig#\~}:q}" ) ]] && menu=yes # We will first try normal completion called with `compgen', but only if we -- Sven Wischnowsky wischnow@informatik.hu-berlin.de