Fixed GNU Screen and tmux configuration file detection.
This commit is contained in:
parent
0ccc0c3fe6
commit
571aa8c8e1
|
@ -82,19 +82,16 @@ fi
|
||||||
|
|
||||||
# Terminal Multiplexer
|
# Terminal Multiplexer
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
local screenrc tmuxconf
|
if [[ "$TERM" == *256color* ]]; then
|
||||||
if [[ "$TERM" == 'xterm-color' ]]; then
|
|
||||||
if [[ -e "$HOME/.screenrc" ]]; then
|
|
||||||
screenrc="-c '$HOME/.screenrc'"
|
|
||||||
tmuxconf="-f '$HOME/.tmux.conf'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$TERM" == 'xterm-256color' ]]; then
|
|
||||||
if [[ -e "$HOME/.screenrc256" ]]; then
|
if [[ -e "$HOME/.screenrc256" ]]; then
|
||||||
screenrc="-c '$HOME/.screenrc256'"
|
screenrc="-c '$HOME/.screenrc256'"
|
||||||
tmuxconf="-f '$HOME/.tmux256.conf'"
|
tmuxconf="-f '$HOME/.tmux256.conf'"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [[ -e "$HOME/.screenrc" ]]; then
|
||||||
|
screenrc="-c '$HOME/.screenrc'"
|
||||||
|
tmuxconf="-f '$HOME/.tmux.conf'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias screen="screen $screenrc"
|
alias screen="screen $screenrc"
|
||||||
|
@ -102,6 +99,8 @@ alias sl="screen $screenrc -list"
|
||||||
alias sr="screen $screenrc -a -A -U -D -R"
|
alias sr="screen $screenrc -a -A -U -D -R"
|
||||||
alias S="screen $screenrc -U -S"
|
alias S="screen $screenrc -U -S"
|
||||||
|
|
||||||
|
if (( ${+commands[tmux]} )); then
|
||||||
alias tmux="tmux $tmuxconf"
|
alias tmux="tmux $tmuxconf"
|
||||||
alias tls="tmux list-sessions"
|
alias tls="tmux list-sessions"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue