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

Re: Alias call in function fails...



On Tue, Jun 23, 2020 at 6:11 AM Kamil Dudka <kdudka@xxxxxxxxxx> wrote:
>
> On Tuesday, June 23, 2020 2:46:50 PM CEST Perry Smith wrote:
> >
> > I don’t know of anything an alias can do that a function can’t?
>
> % alias %=' '
> % alias mkdir='nocorrect mkdir'
> % alias zfget='noglob zfget'

Yes, that's one of two things alias can do that functions cannot:
Give instructions to the parser.

The other thing is make replacements in contexts other than the
"command  position" (global aliases).

Both of those are intended as interactive features, though, because
there are other ways to do them in scripts, where saving keystrokes
and the user's memory are not important.



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