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

Re: [BUG] 'exec' runs shell functions and builtins



On Thu, Jul 27, 2017 at 2:02 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
>
> % (setopt posixbuiltins; exec command echo foo)
> zsh: command not found: command

Chet Ramey emailed me:
=====
"However, all of the standard utilities, including the regular built-ins in
the table, but not the special built-ins described in Special Built-In
Utilities, shall be implemented in a manner so that they can be accessed
via the exec family of functions as defined in the System Interfaces volume
of POSIX.1-2008 and can be invoked directly by those standard utilities
that require it (env, find, nice, nohup, time, xargs)."

`command' is explicitly listed in the table in

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_06
=====

So "exec command ..." is actually supposed to work, as is "exec read",
"exec getopts", etc.  Urk.



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