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

Re: preexec function to work after `&&'



Eric Smith wrote:
> This mime type like preexec makes life a lot more convenient
> (for me anyways) by automatically launching the given file
> with the associated application - but it don't work in a compound command
> like sleep 1 && some.pdf (or whatever the file happens to be).
> 
> How might I fix this?

With difficulty. Don't think you can.

I use something similar for mhshow. Other problem with this scheme is
that correction doesn't know about it. Perhaps we should allow a special
form of aliases to be patterns.

> And while you are at it (if you are), how could I introduce case insensitivity
> on the suffixes.

Put (#i) before the file patterns

Oliver



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