nested shells on set default-command

27 views
Skip to first unread message

Hovnatan Karapetyan

unread,
Jan 14, 2020, 8:30:52 AM1/14/20
to tmux-users
When I use set-option -g default-command "${SHELL}" in my config (to avoid opening login shells) I get nested (fish) shells on tmux new-session:
|-tmux: server(40577)-+-fish(40755)---fish(40809)
|                     `-fish(41032)---fish(41035)
Is there a way to avoid this behaviour?

Thanks!

topcat

unread,
Jan 16, 2020, 10:49:00 AM1/16/20
to tmux-users
I don't run fish but am unable to reproduce this with bash. Can something in the fish config cause this?

Hovnatan Karapetyan

unread,
Jan 17, 2020, 2:14:52 AM1/17/20
to topcat, tmux-users
I'm not sure what the problem was but, as per suggestion from Nicholas Marriott now I use "exec $SHELL" and the problem is gone.

Thanks!

--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/102a1145-e639-465c-8ad5-53cb11384206%40googlegroups.com.

Nicholas Marriott

unread,
Jan 17, 2020, 3:24:49 AM1/17/20
to Hovnatan Karapetyan, topcat, tmux-users
exec tells the shell to replace itself with the command rather than
running it then waiting around for it to exit.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAJtOHnLEjcXpYepTXCwVbs0ak-A0hfK-vVgAyH4mmLbwcMZkSg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages