From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22983 invoked from network); 3 Apr 2000 11:32:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Apr 2000 11:32:24 -0000 Received: (qmail 26728 invoked by alias); 3 Apr 2000 11:32:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10409 Received: (qmail 26716 invoked from network); 3 Apr 2000 11:32:01 -0000 Date: Mon, 3 Apr 2000 13:31:50 +0200 (MET DST) Message-Id: <200004031131.NAA31584@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Mon, 03 Apr 2000 10:51:54 +0100 Subject: Re: A couple of bugs Oliver Kiddle wrote: > ... > > The second bug is that completion after ~+ or ~- seems to have been > broken since dev-19: > cd ~+1/ > unknown user `+1' > Here I would expect file completion after the appropriate directory > from the stack. The problem is also the case for named directories. _path_files just wasn't able to handle the directory stack entries. Bye Sven Index: Completion/Core/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v retrieving revision 1.3 diff -u -r1.3 _path_files --- Completion/Core/_path_files 2000/04/03 11:05:16 1.3 +++ Completion/Core/_path_files 2000/04/03 11:30:21 @@ -170,6 +170,23 @@ realpath="${userdirs[$linepath]%/}/" elif (( $+nameddirs[$linepath] )); then realpath="${nameddirs[$linepath]%/}/" + elif [[ "$linepath" = [-+][0-9]## ]]; then + if [[ "$linepath" = -* ]]; then + tmp=$(( $#dirstack $linepath )) + else + tmp=$linepath[2,-1] + fi + [[ -o pushdminus ]] && tmp=$(( $#dirstack - $tmp )) + if (( ! tmp )); then + realpath=$PWD/ + elif [[ tmp -le $#dirstack ]]; then + realpath=$dirstack[tmp]/ + else + _message 'not directory stack entries' + return 1 + fi + elif [[ "$linepath" = [-+] ]]; then + realpath=${~:-\~$linepath}/ else _message "unknown user \`$linepath'" return 1 -- Sven Wischnowsky wischnow@informatik.hu-berlin.de