mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
scripts/tmuxs/main.sh: dont call new.sh if $selected is empty
This commit is contained in:
parent
feeb6e596e
commit
eb376bd7d4
1 changed files with 3 additions and 1 deletions
|
|
@ -10,7 +10,9 @@ KILL_SCRIPT=${BASE_PATH}/kill.sh
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
if [[ "$1" == "-a" ]]; then
|
if [[ "$1" == "-a" ]]; then
|
||||||
selected=$($LIST_SESSIONS_SCRIPT | $FZF --bind "ctrl-d:execute(${KILL_SCRIPT} {})+reload(${LIST_SESSIONS_SCRIPT})" --border-label=Session | sed 's/: .*//g')
|
selected=$($LIST_SESSIONS_SCRIPT | $FZF --bind "ctrl-d:execute(${KILL_SCRIPT} {})+reload(${LIST_SESSIONS_SCRIPT})" --border-label=Session | sed 's/: .*//g')
|
||||||
${BASE_PATH}/new.sh $selected
|
if [ ! -z "$selected" ]; then
|
||||||
|
${BASE_PATH}/new.sh $selected
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
${BASE_PATH}/new.sh $(realpath $1)
|
${BASE_PATH}/new.sh $(realpath $1)
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue