Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Null tilde expansions?



On Oct 7, 10:50am, Greg Badros wrote:
} Subject: Re: Null tilde expansions?
}
} > Yes, you're right.  Or just ${dirs##~*}, in which the ~ is not expanded
} > in the first place.
} 
} Why does the ~ not get expanded?  This doesn't work in 3.1.4 or 3.0.x
} for me.  I need to escape the ~ with a backslash here, too.

I dunno, but:

aztec[26] gunk=(schaefer glorb bobg flarn fox)
aztec[27] dirs=(~$^gunk)
zsh: no such user or named directory: glorb
aztec[28] setopt nonomatch
aztec[29] dirs=(~$^gunk)
aztec[30] echo ${dirs##~*}
/home/schaefer /home/bobg /home/fox
aztec[31] echo $dirs
/home/schaefer ~glorb /home/bobg ~flarn /home/fox
aztec[32] echo $ZSH_VERSION
3.0.5-extended

(3.0.5-extended is 3.0.5 plus my patch collection, available on
ftp.brasslantern.com.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author