From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10257 invoked from network); 13 Apr 2001 05:09:18 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 2001 05:09:18 -0000 Received: (qmail 2385 invoked by alias); 13 Apr 2001 05:09:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13974 Received: (qmail 2368 invoked from network); 13 Apr 2001 05:09:17 -0000 From: "Bart Schaefer" Message-Id: <1010413050904.ZM1154@candle.brasslantern.com> Date: Fri, 13 Apr 2001 05:09:03 +0000 In-Reply-To: Comments: In reply to Wayne Davison "Automatic hash -d" (Apr 12, 7:08pm) References: <1010413045004.ZM1107@candle.brasslantern.com> In-Reply-To: <1010413045004.ZM1107@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: "keep-prefix true" feature request" (Apr 13, 4:50am) X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh Workers Subject: Re: Automatic hash -d MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 12, 7:08pm, Wayne Davison wrote: } Subject: Automatic hash -d } } In the old completion system, I can complete a path that includes a } variable prefixed with a ~ without having to first use an explicit } hash -d. In the new completion system, this only works if I complete } just the ~VAR name first. On Apr 13, 9:50pm, Bart Schaefer wrote: } } [Writing about _path-files] ... it expands } the tilde-expression by checking whether there is already a dirstack } entry, not by actually evaluating the expression. This provides the automatic naming of the directory, but I wonder if it ought to have some kind of style test for performance reasons? (Line numbers relative to my patch in 13973.) Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.1 diff -u -r1.1 _path_files --- Completion/Unix/Type/_path_files 2001/04/02 11:36:27 1.1 +++ Completion/Unix/Type/_path_files 2001/04/13 05:00:59 @@ -199,6 +215,7 @@ # prefix path by setting `prepaths'. linepath="${pre[2,-1]%%/*}" + eval : "~$linepath" 2>/dev/null # Create nameddir if necessary if [[ -z "$linepath" ]]; then realpath="${HOME%/}/" elif (( $+userdirs[$linepath] )); then -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net