Zsh: move tmux lauch to it's own configuration file and make it the
first one executed
This commit is contained in:
parent
c284adf736
commit
44a63ba8a4
8 changed files with 13 additions and 14 deletions
8
home/.config/zsh/01-tmux.zsh
Normal file
8
home/.config/zsh/01-tmux.zsh
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Launch tmux if logging in over ssh
|
||||
if [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
if tmux has-session -t ssh_tmux &2>/dev/null; then
|
||||
exec tmux -2 attach-session -t ssh_tmux
|
||||
else
|
||||
exec tmux -2 new-session -s ssh_tmux
|
||||
fi
|
||||
fi
|
|
@ -1,14 +0,0 @@
|
|||
# Launch tmux if logging in over ssh
|
||||
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
||||
if tmux has-session &2>/dev/null; then
|
||||
exec tmux attach-session -t ssh_tmux
|
||||
else
|
||||
exec tmux new-session -s ssh_tmux
|
||||
fi
|
||||
fi
|
||||
|
||||
# share history between running zsh instances
|
||||
setopt share_history
|
||||
|
||||
# ignore commands with leading space from history
|
||||
setopt histignorespace
|
5
home/.config/zsh/07-misc.zsh
Normal file
5
home/.config/zsh/07-misc.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
# share history between running zsh instances
|
||||
setopt share_history
|
||||
|
||||
# ignore commands with leading space from history
|
||||
setopt histignorespace
|
Loading…
Reference in a new issue