Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Expanding a global alias
- X-seq: zsh-users 11845
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: Expanding a global alias
- Date: Sun, 16 Sep 2007 21:14:47 +0200
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YGmZAWBJoLQGWPsEAOBmKstqxF/hEViJdOOWjw3jl9s=; b=Q+lY/O0lMAPhuGt93pGVSK5fzXuke5sDhLFORHOxynzwAXG4HdFp5Lx17U1pKusRDHY9XlryhUl6NX9tjC8kqVWmT5b/iXrevUuP7kh5z/nx7/IJ2QVgH0mx/QlUXtx+VBTgvgxYeu4+6FTnVIQQVO/ZyWxp0tIzMgnSJljEfcU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=anVafOaFz4aIDWc/64wyYOwGNBW/2KGAWzzQ8ZpMv0haXMSLvr4JoNdJ2yfK2+H0fU0vf92S7qd0Ki8rJRp8tDpFQt5SvPebNzV2I9M87JiLrQ+ROn1oL008g2W85pvB3IriiocS2yb+D9IN+YbkFJ6HZcApqBKR/9iczvnEVe8=
- In-reply-to: <Xns99ADC90A1640Fzzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns99ADC90A1640Fzzappergmailcom@xxxxxxxxxxx>
On 16/09/2007, zzapper <david@xxxxxxxxxx> wrote:
> Hi
>
> I use a global alias as follows
> >alias -g NF='*(.om[1])' # newest file
>
> so I can write say
>
> >cp NF /tmp
>
> Is there any way of making the above (or similar) tab expandable
>
> ie
> >cp NF<tab>
>
> expands to
>
> >cp thanks.php
If you press ^Xa it should expand to the *(.om[1]) which you can then
tab expand. (that's ctrl-x a, not ctrl-x ctrl-a, if that happens to
not be a default binding it's _expand_alias).
BTW it seems _expand_alias has a bug...
I have alias -g XP='"`bs file`"' but it expands to only `bs file`, not
"`bs file`".
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author