Re: :t and getting senile.




Stephane Chazelas wrote:
On Mon, 25 Sep 2006 21:23:23 +0100, Stephane CHAZELAS wrote:
[...]
$var:h in zsh gives the dirname even for the cases where
${var%/*} fails such as when var=foo (not with csh or tcsh).
Same for $var:t vs ${var##*/} when var=/foo/.

I forgot to mention that with zsh, they can also be used in the
globbing qualifiers, as globbing modifiers.

Like:

printf '%s\n' /etc/**/*(:t)

prints the *names* (not paths) of all the files under /etc.

--
Stephane


Thanks all. Yes...yes...yes. That is it. I can't believe how
easily I forgot that. Arrrgghhh.. Thank you all for reminding me. I
know have a sticky not. :)

.



Relevant Pages