Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: suffix alias on a generated file name
- X-seq: zsh-users 24529
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zzapper <david@xxxxxxxxxxxxxx>
- Subject: Re: suffix alias on a generated file name
- Date: Sat, 14 Dec 2019 11:17:51 +0000
- Cc: zsh-users@xxxxxxx
- In-reply-to: <XnsAB2489C6C6331davidrayninfocouk@195.159.176.226>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsAB2489C6C6331davidrayninfocouk@195.159.176.226>
zzapper wrote on Fri, Dec 13, 2019 at 13:32:37 -0000:
> Hi
> I want to open the most recently editted text file with vim using a suffix
> alias
>
> alias -s txt='gvim'
> alias NF='*(.om[1])'
> touch fred.txt
> NF<tab>
> *(.om[1])<TAB>
> So double-tabbing will then exercise the suffix alias and open fred.txt in
> gvim.
>
> BUT how do I do that without the manual TABing?
What's wrong with
alias NF='gvim *.txt(.om[1])'
?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author