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

Re: Twitter Daily ZSH Tip



Valodim Skywalker <valodim@xxxxxxxxxxxxxx> wrote in 
news:20131020173646.GA11398@xxxxxxxxxxxxxx:

> zzapper(david@xxxxxxxxxxxxxx)@Sat, Oct 19, 2013 at 10:09:35AM +0000:
>> vi *(.om[$1])   # vim newest file
> 
> The [$1] should probably be [1] ;)
Valodim,
Whoops yes I carelessly borrowed that from my .zshrc where I have a 
function which allows me specify more options

function vew()
{
# name : vew
# description : vi newest file
# or nth newest file if a numeric parameter
# or newest file with $1 string in name
if [ $# -gt 0 ]
then
   if [[ "$1" == [0-9] ]]
   then
   gvim.exe *(.om[$1]) &
   else
   gvim.exe *$1*(.om[1]) &
fi
else
gvim.exe *~vssver.scc(.om[1]) &
fi
}

zzapper



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