I switched from
fish shell. I liked it and decided to use it on my servers also. How can I start
tmux automatically on
ssh connection? I followed this instruction for bash but
fish shell is different and this recipe doesn't work without cardinal rewriting.
I rewrote script. The most tricky part was to disconnect from
ssh by exiting from
./.config/fish/config.fish didn't work.
tmux only if parent of the
Here is part of my
if status --is-login set PPID (echo (ps --pid %self -o ppid --no-headers) | xargs) if ps --pid $PPID | grep ssh tmux has-session -t remote; and tmux attach-session -t remote; or tmux new-session -s remote; and kill %self echo "tmux failed to start; using plain fish shell" end end
Byobu, a terminal multiplexer, based on tmux, offers an autostart feature.