Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] 'exec' runs shell functions and builtins
- X-seq: zsh-workers 41530
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [BUG] 'exec' runs shell functions and builtins
- Date: Fri, 11 Aug 2017 16:25:01 +0100
- Cms-type: 201P
- In-reply-to: <10971700.ghLbJLaWGu@kdudka-nb>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <fd2a215e-5832-f135-c69d-a1f4e1a6c99e@inlv.org> <20170727100206.4dda10d9@pwslap01u.europe.root.pri> <CAH+w=7bE=MP0TqAeyPWP4Ut-UBXRDbVt2+DEnNb35BotA4BeYw@mail.gmail.com> <CGME20170811151107epcas5p2e957759dcd5c9eabacfd02afdf5ff47e@epcas5p2.samsung.com> <10971700.ghLbJLaWGu@kdudka-nb>
On Fri, 11 Aug 2017 17:10:12 +0200
Kamil Dudka <kdudka@xxxxxxxxxx> wrote:
> It is good that zsh does not need this in its native configuration but
> how is it supposed to work in the POSIX emulation mode now?
>
> % (exec cd)
> % emulate sh
> % (exec cd)
> zsh: command not found: cd
>
> If I understand http://www.zsh.org/mla/workers/2017/msg01138.html correctly,
> then the above command should work?
I can't actually think of a useful application of the above that would
make "work" meaningful. What's the "exec" supposed to be doing? Who
would even try to exec a builtin, even if they discover that for some
bizarre reason the standard says you can? The one possible use of
"exec" in that case might be to ensure you're *not* using a builtin ---
but apparently you are? What?
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author