Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with user function
- X-seq: zsh-users 29701
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Problem with user function
- Date: Fri, 23 Feb 2024 10:36:06 -0800
- Archived-at: <https://zsh.org/users/29701>
- In-reply-to: <CAN=4vMp8fz6EsAmorMVnZ=La7FxNB1jGk4jrmHqHwZeeKh=t7w@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <20240223104901.35a540adb685459cdfe3c2a5@gmx.com> <0a15d4f3-e222-4100-ad5f-e702dacbad9c@eastlink.ca> <CAN=4vMp8fz6EsAmorMVnZ=La7FxNB1jGk4jrmHqHwZeeKh=t7w@mail.gmail.com>
On Fri, Feb 23, 2024 at 10:32 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Fri, Feb 23, 2024 at 7:16 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> >
> > You can't have an alias like that inside a function.
>
> You can. Try it.
Ray is confusing the error message, with the difference between this:
alias ls='ls -A'
nls() { ls ~/notes/${1} }
And this:
nls() { ls ~/notes/${1} }
alias ls='ls -A'
In the latter example, "nls" will not use the alias, whereas in the
former example, it will.
Zsh does not issue a warning for either of those examples, though.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author