From 202f7e4558b3d5adfa7be1f7e7cb3c274c3ed1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 26 Apr 2023 11:43:34 +0200 Subject: [PATCH] fix(tmux-sessionizer): unbound variable bug --- modules/programs/tmux.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index 7d5677c..aba543a 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -13,15 +13,15 @@ let options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*") if [[ -z $options ]]; then - return 1 + exit 1 elif [[ $(wc -l <<< "$options") -eq 1 ]]; then selected="$options" else - echo "$options" | fzf --query="$*" + selected=$(echo "$options" | fzf --query="$*") fi if [[ -z $selected ]]; then - exit 0 + exit 0 fi selected_name=$(basename "$selected" | tr . _)