Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Function names prefixed with "%"
- X-seq: zsh-users 27807
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Function names prefixed with "%"
- Date: Fri, 27 May 2022 03:36:20 +0200
- Archived-at: <https://zsh.org/users/27807>
- In-reply-to: <CAMP9c5=UwP7xG6xbAGZKMX-angbhc_iaJoDT=BOwn3PXK-QKkA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5=UwP7xG6xbAGZKMX-angbhc_iaJoDT=BOwn3PXK-QKkA@mail.gmail.com>
On 5/27/22, Zach Riggle <zachriggle@xxxxxxxxx> wrote:
> It seems that it's completely valid to declare a function with a leading
> percent, but it's not able to be called due to be interpreted as job
> control.
>
> $ %paste() { echo hi }
>
> $ declare -f '%paste'
> %paste () {
> echo hi
> }
>
> $ %paste
> fg: job not found: paste
>
> Is there any way around this behavior? I've found that this can be worked
> around with aliases...
>
> alias '%p=%paste'
>
>
> But I expect there are other / better ways.
\%paste
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author