Invoke tmux only after checking its existence

This commit is contained in:
Enrico Lumetti 2016-08-30 16:48:21 +02:00
parent b6cab458ed
commit 5ee57f18df

View File

@ -3,10 +3,10 @@
hook global KakBegin .* %{ hook global KakBegin .* %{
%sh{ %sh{
VERSION_TMUX=$(tmux -V)
VERSION_TMUX=$(expr "${VERSION_TMUX}" : 'tmux \([0-9]*\).*')
if [ -n "$TMUX" ]; then if [ -n "$TMUX" ]; then
VERSION_TMUX=$(tmux -V)
VERSION_TMUX=$(expr "${VERSION_TMUX}" : 'tmux \([0-9]*\).*')
if [ "${VERSION_TMUX}" -gt 1 ]; then if [ "${VERSION_TMUX}" -gt 1 ]; then
echo " echo "
alias global repl tmux-repl-horizontal alias global repl tmux-repl-horizontal