Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Using Global aliases to make a "macro" shell
- X-seq: zsh-users 10519
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: Using Global aliases to make a "macro" shell
- Date: Sat, 15 Jul 2006 21:46:12 +0200
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LJeCCLg0wpKyrafUuYIY0B3/dmQ1Ah8gvyRpRzbWp1hYtTr1IAFgpW7rKwYyA/x73Ux3TIAnSHh1Yu8vuXa2NqeLSlaPrIjeLSY6Ebgv64bnsrRNAE7BbLTHKki64z3fYOqJQcIejtB7hPU2iEN+0Duh9Uaz92+mjYg52c+s4xE=
- In-reply-to: <Xns9801B0B9F6202zzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns98017A3A81F80zzappergmailcom@xxxxxxxxxxx> <237967ef0607150905v400bac6cl9dc9add48786074a@xxxxxxxxxxxxxx> <Xns9801B0B9F6202zzappergmailcom@xxxxxxxxxxx>
On 7/15/06, zzapper <david@xxxxxxxxxx> wrote:
"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?
Yeah, you have to do what i wrote you have to do :). It's a widget i
created by copying and modifying _most_recent_file.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author