Check if tmux is available with command -v
This commit is contained in:
parent
0eb42f0ea3
commit
5086ba686d
2
zlogin
2
zlogin
|
@ -41,7 +41,7 @@ if [ -f ~/.ssh/config_00base ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# List tmux sessions if tmux is available
|
# List tmux sessions if tmux is available
|
||||||
if hash tmux; then
|
if [ $(command -v tmux) ]; then
|
||||||
TMUX_SESSION=$(tmux ls 2> /dev/null|grep -- window)
|
TMUX_SESSION=$(tmux ls 2> /dev/null|grep -- window)
|
||||||
# If tmux session available and if not already inside a tmux
|
# If tmux session available and if not already inside a tmux
|
||||||
if [ ${TMUX_SESSION} ] && [ -z "${TMUX}" ]; then
|
if [ ${TMUX_SESSION} ] && [ -z "${TMUX}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue