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

Re: Twitter Daily ZSH Tip



On Mon, 28 Oct 2013 10:34:59 -0700
Eric De Mund <ead@xxxxxxxxx> wrote:
> > vi *(.om[$1])   # vim newest file
> 
> Problem here:
> 
>     % vi *(.om[$1])         
>     zsh: bad math expression: operand expected at `'

I think you want

  vi *(.om[1])

or if you wanted to be really different

  vi *(.Om[-1])

Otherwise you're substituting a positional parameter, which you don't
want.  The error you got comes from it being empty, so there's no
number, which is what it's complaining about, slightly cryptically.

pws



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