Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap commands cont. ';' in sh when $SHELL == zsh #690

Conversation

justinsteven
Copy link
Contributor

Continues on from #635

@idolf said at #635 (comment):

Could you reopen this PR against the dev branch? Or perhaps against the stable branch? Is it a bugfix or a feature?

It's a bugfix. run_in_new_terminal() interacts poorly with zsh and tmux when told to run multiple ;-separated commands. Something (zsh?) is seeing Ctrl-C (e.g. when telling a process inside gdb to break) and tearing down tmux panes as soon as the tmux pane is resized.

I'm not sure if it's a zsh or tmux bug, or if it's just one of those "handling SIGINT is hard" things, but it annoys me a lot. Nothing like lost gdb's to wreck your day.

Do you think the fix would be to wrap the command in sh -c as per this PR, or would you rather see run_in_new_terminal() not be used to run ;-separated commands as per #635 (comment)

As it's a bugfix (admittedly, one that seems to annoy no one but me even though others have reproduced my findings) I've PR'd against stable. Let me know if it'd be more suitable to target dev.

works around issues of zsh+tmux and strange handling of SIGINT
@zachriggle
Copy link
Member

Rather than hack around zsh shortcomings, it's easier to disallow semicolons. If a user has need to run multiple commands in a new terminal, they should create a script/binary on disk and manually invoke it.

@justinsteven
Copy link
Contributor Author

👍

Thanks @zachriggle

@zachriggle zachriggle modified the milestone: 3.2.0 Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants