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

Re: Using Global aliases to make a "macro" shell



"Mikael Magnusson" <mikachu@xxxxxxxxx> wrote in
news:237967ef0607150905v400bac6cl9dc9add48786074a@xxxxxxxxxxxxxx: 

> On 7/15/06, zzapper <david@xxxxxxxxxx> wrote:
>> Using Global aliases to make a "macro" shell
>>
> A related very useful keybind is
> bindkey "^N"      _most_recent_file
> although it completes files and directories alike, despite the name.
> Also very useful is
>   bindkey "^[^N"    _most_accessed_file
> Just copy _most_recent_file and apply
> 17c17
> <   eval "file=($PREFIX*$SUFFIX(om[${NUMERIC:-1}]N))"
> ---
>>   eval "file=($PREFIX*$SUFFIX(oa[${NUMERIC:-1}]N))"
> 21c21
> <   eval "file=($PREFIX*$SUFFIX(om[${NUMERIC:-1}]N))"
> ---
>>   eval "file=($PREFIX*$SUFFIX(oa[${NUMERIC:-1}]N))"
> 
> PS why the ls invocations? this seems to work just as well
> alias -g NF='*(.om[1])'
> alias -g ND='*(/om[1])'
> 
Thanks that's why I post these to see how to do it better!
BTW I get _most_accessed_file widget not available (zsh 4.2.6) what Do I 
have to do activate it?
zzapper


-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips



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