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

:r modifier



Hi people!

Is the following behaviour correct?

  ~ % echo $MAIL
  /home/adl/.procmail/spool/Inbox
  ~ % echo $MAIL:r $MAIL:e
  /home/adl/ procmail/spool/Inbox

I was expecting to get $MAIL:r equal to $MAIL and $MAIL:e empty.

The corresponding documentation reads as follow.

  r
       Remove a trailing suffix of the form `.XXX', leaving the basename.

  e
       Remove all but the suffix.

  t    
       Remove all leading pathname components, leaving the tail.

I find it quite confusing: I don't think :r leaves the basename,
but this is what :t does!

Ciao,
-- 
Alexandre Duret-Lutz



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