From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22221 invoked from network); 19 Aug 1998 19:20:36 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Aug 1998 19:20:36 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id PAA11224; Wed, 19 Aug 1998 15:06:41 -0400 (EDT) Resent-Date: Wed, 19 Aug 1998 15:06:41 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980819120806.ZM11746@candle.brasslantern.com> Date: Wed, 19 Aug 1998 12:08:06 -0700 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: Bug? multicomp no longer works for paths starting with tilde (~) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"V4yf41.0.Gl2.09osr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4334 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu The multicomp function seems to assume that newtop=${~origtop} will expand to the user's home directory, but that doesn't happen. Later, reply=(${~reply}) also doesn't expand the home directory, and hence finds no matches. This seems to apply to both 3.0.5 and 3.1.4. Am I just misunderstanding what's supposed to be happening? I reverted back to the baseline 3.1.4 version of multicomp, and it still won't complete anything starting with a tilde. The following seems to work better, but messes up if there are wildcards following the tilde. Suggestions? Index: multicomp =================================================================== *** multicomp 1998/08/19 18:00:16 1.2 --- multicomp 1998/08/19 19:04:22 *************** *** 3,9 **** # e.g. s/z/s -> src/zsh-2.4/src # # Usage: e.g. ! # compctl -D -f + -U -K multicomp # # Note that exactly matched directories are not expanded, e.g. # s/zsh-2.4/s will not expand to src/zsh-2.4old/src. --- 3,9 ---- # e.g. s/z/s -> src/zsh-2.4/src # # Usage: e.g. ! # compctl -D -f + -U -Q -K multicomp # # Note that exactly matched directories are not expanded, e.g. # s/zsh-2.4/s will not expand to src/zsh-2.4old/src. *************** *** 32,38 **** if [[ "$pref" = \~* ]]; then # If the string started with ~, save the head and what it will become. origtop="${pref%%/*}" ! newtop=${~origtop} # Save the expansion as the bit matched already sofar=($newtop) pref="${pref#$origtop}" --- 32,38 ---- if [[ "$pref" = \~* ]]; then # If the string started with ~, save the head and what it will become. origtop="${pref%%/*}" ! eval newtop=${~origtop} # Save the expansion as the bit matched already sofar=($newtop) pref="${pref#$origtop}" -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com