From 5086ba686d71b0df6d1af6dd93041c4cdefdaaa4 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sat, 18 Sep 2021 23:05:54 +0200 Subject: [PATCH] Check if tmux is available with command -v --- zlogin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zlogin b/zlogin index 6d4eeb8..81b4c90 100644 --- a/zlogin +++ b/zlogin @@ -41,7 +41,7 @@ if [ -f ~/.ssh/config_00base ]; then fi # 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) # If tmux session available and if not already inside a tmux if [ ${TMUX_SESSION} ] && [ -z "${TMUX}" ]; then