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

Re: Expanding a global alias



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