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

Re: Exit by the exec command.



On Sat, Jun 17, 2023 at 11:18 AM LitHack <lithack0@xxxxxxxxx> 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.




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