Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parameter substitution bug
- X-seq: zsh-workers 6160
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- Subject: Re: Parameter substitution bug
- Date: Thu, 29 Apr 1999 10:38:15 -0700
- In-reply-to: <9904291607.AA25422@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <9904291607.AA25422@xxxxxxxxxxxxxxxxx>
On Apr 29, 6:07pm, Peter Stephenson wrote:
> Subject: Parameter substitution bug
> Can anybody explain this?
>
> % cat tst
> print $HOME/bin
> print ~/bin
> fdir='~/bin'
> print ${~fdir}
> setopt globsubst
> print $fdir
> % zsh -f ./tst
> /home/user2/pws/bin
> /home/user2/pws/bin
> ~/bin
> ~/bin
>
> Why don't the last two give the same as the first two?
Because globsubst and ${~...} only do filename *generation* not filename
*expansion*. It's always been like this ... you never noticed?
Tilde is not a glob character.
I always thought that using tilde as the turn-on-globsubst character was
a bad idea because it tends to make one think that tilde-expansion will
happen ... but there's really no other character available.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author