zsh-workers
 help / color / mirror / code / Atom feed
* Exit by the exec command.
@ 2023-06-17  9:17 LitHack
  2023-06-17  9:26 ` Roman Perepelitsa
  0 siblings, 1 reply; 2+ messages in thread
From: LitHack @ 2023-06-17  9:17 UTC (permalink / raw)
  To: zsh-workers

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

Running the command {exec -c ls } will exit the terminal in zsh but in bash
it will  show the result and then exit. Is there any explanation regarding
to this.

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

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

* Re: Exit by the exec command.
  2023-06-17  9:17 Exit by the exec command LitHack
@ 2023-06-17  9:26 ` Roman Perepelitsa
  0 siblings, 0 replies; 2+ messages in thread
From: Roman Perepelitsa @ 2023-06-17  9:26 UTC (permalink / raw)
  To: LitHack; +Cc: zsh-workers

On Sat, Jun 17, 2023 at 11:18 AM LitHack <lithack0@gmail.com> wrote:
>
> Running the command {exec -c ls } will exit the terminal in zsh but in bash it will  show the result and then exit. Is there any explanation regarding to this.

I don't see any difference between bash and zsh in this regard.

    % zsh -fc 'exec -c ls'
    % bash --norc -c 'exec -c ls'

Both of these commands behave the same.

Roman.

P.S.

zsh-workers isn't the right place for these questions. zsh-users is
more suitable.


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

end of thread, other threads:[~2023-06-17  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-17  9:17 Exit by the exec command LitHack
2023-06-17  9:26 ` Roman Perepelitsa

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