From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24757 invoked from network); 18 Apr 2000 15:08:49 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Apr 2000 15:08:48 -0000 Received: (qmail 23175 invoked by alias); 18 Apr 2000 15:08:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10812 Received: (qmail 23162 invoked from network); 18 Apr 2000 15:08:40 -0000 Date: Tue, 18 Apr 2000 17:08:38 +0200 (MET DST) Message-Id: <200004181508.RAA20128@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Tue, 18 Apr 2000 15:41:05 +0100 Subject: PATCH: Re: directory completion bug Peter Stephenson wrote: > % print ~1/^D > Completing unknown user `1' > % print ~1 > /home/pws/src/ Oops. Bye Sven Index: Completion/Core/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v retrieving revision 1.8 diff -u -r1.8 _path_files --- Completion/Core/_path_files 2000/04/17 08:04:42 1.8 +++ Completion/Core/_path_files 2000/04/18 15:08:02 @@ -170,7 +170,14 @@ realpath="${userdirs[$linepath]%/}/" elif (( $+nameddirs[$linepath] )); then realpath="${nameddirs[$linepath]%/}/" - elif [[ "$linepath" = [-+][0-9]## ]]; then + elif [[ "$linepath" = ([-+]|)[0-9]## ]]; then + if [[ "$linepath" != [-+]* ]]; then + if [[ -o pushdminus ]]; then + linepath="-$linepath" + else + linepath="+$linepath" + fi + fi if [[ "$linepath" = -* ]]; then tmp=$(( $#dirstack $linepath )) else -- Sven Wischnowsky wischnow@informatik.hu-berlin.de