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

Re: [RFC][PATCH] Add zrestart()



On Tue, Apr 27, 2021 at 8:49 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> On Tue, Apr 27, 2021 at 2:49 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > On Tue, Apr 27, 2021 at 1:43 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> > >
> > > By the way: What kind of error in the dotfiles would cause the shell
> > > not to be able to start?
> >
> > Adding the following line to zshrc should do it:
> >
> >     exec true
> >
> > Something like this does happen in the real world. E.g., it's not
> > uncommon to exec into tmux from rc files.
>
> Thanks! Now I know how to test that. And now I also know that my test
> doesn't catch that. :(

Bart's solution fails for that case, too, btw:

% cd $(mktemp -d)
% HOME=$PWD ZDOTDIR=$PWD exec zsh -f
% print 'exec true' >| .zshrc
% exec zsh -d &
[1] 81931
%
[1]  + suspended (tty output)  exec zsh -d
% exec fg
[1]  + continued  exec zsh -d
zsh: can't set tty pgrp: interrupt

[Process completed]




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