Skip to content

Commit

Permalink
Use if statement instead of curly braces in _forgit_ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sandr01d committed Mar 28, 2024
1 parent b099a40 commit 685d21b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}
Expand Down

0 comments on commit 685d21b

Please sign in to comment.