zsh-users
 help / color / mirror / code / Atom feed
* builtin log supercedes "log" command, only in non-interactive mode
@ 2021-11-11  6:03 Zach Riggle
  2021-11-11  6:24 ` Lawrence Velázquez
  0 siblings, 1 reply; 3+ messages in thread
From: Zach Riggle @ 2021-11-11  6:03 UTC (permalink / raw)
  To: Zsh Users

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

So it seems that "builtin log" takes precedence over commands named "log"
in $path, but only for non-interactive shells.

Is this intentional?  It seems unexpected to me, and it was quite hard to
figure out what the root cause was as the error message is not useful
(./myscript:log:5: too many arguments).

I know I can work around this with "command log", I was just surprised that
it works this way.

    $ cat what
    #!/usr/bin/env zsh
    which -a log

    $ which -a log
    /usr/bin/log

    $ zsh ./what
    log: shell built-in command
    /usr/bin/log

    $ zsh -i ./what
    /usr/bin/log

*Zach Riggle*

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

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

end of thread, other threads:[~2021-11-11  6:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  6:03 builtin log supercedes "log" command, only in non-interactive mode Zach Riggle
2021-11-11  6:24 ` Lawrence Velázquez
2021-11-11  6:40   ` Lawrence Velázquez

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).