From 685d21bee2adba1b1f351c698c567d029bff7079 Mon Sep 17 00:00:00 2001 From: sandroid Date: Thu, 28 Mar 2024 21:29:18 +0100 Subject: [PATCH] Use if statement instead of curly braces in _forgit_ignore --- bin/git-forgit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/git-forgit b/bin/git-forgit index 610f1ed..1cc127b 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -875,13 +875,14 @@ _forgit_ignore() { $FORGIT_IGNORE_FZF_OPTS " # shellcheck disable=SC2206 - args=($@) && [[ $# -eq 0 ]] && { + args=($@) + if [[ $# -eq 0 ]]; then args=() while IFS='' read -r arg; do args+=("$arg") done < <(_forgit_ignore_list | nl -w4 -s' ' | FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $2}') - } + fi [ ${#args[@]} -eq 0 ] && return 1 # shellcheck disable=SC2068 _forgit_ignore_get ${args[@]}