Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Twitter Daily ZSH Tip
- X-seq: zsh-users 18040
- From: zzapper <david@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Twitter Daily ZSH Tip
- Date: Sun, 20 Oct 2013 18:06:11 +0000 (UTC)
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Your Company
- References: <XnsA25E718C16692davidrayninfocouk@80.91.229.13> <20131020173646.GA11398@mugenguild.com>
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