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

Re: suffix alias on a generated file name



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