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.

% echo $dirs
/home/user2/pws ~foobar
% unsetopt extendedglob
% echo ${dirs##~*}     
/home/user2/pws
% setopt extendedglob
% echo ${dirs##~*}   
/home/user2/pws ~foobar

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy



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