zsh-users
 help / color / mirror / code / Atom feed
* Function names prefixed with "%"
@ 2022-05-27  1:14 Zach Riggle
  2022-05-27  1:36 ` Mikael Magnusson
  2022-05-27  3:49 ` Bart Schaefer
  0 siblings, 2 replies; 7+ messages in thread
From: Zach Riggle @ 2022-05-27  1:14 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

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.

*Zach Riggle*

[-- Attachment #2: Type: text/html, Size: 1032 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-27 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27  1:14 Function names prefixed with "%" Zach Riggle
2022-05-27  1:36 ` Mikael Magnusson
2022-05-27  1:57   ` Zach Riggle
2022-05-27  2:40     ` Lawrence Velázquez
2022-05-27  3:49 ` Bart Schaefer
2022-05-27 11:08   ` Mikael Magnusson
2022-05-27 17:09     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).