mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Use if statement instead of curly braces in _forgit_ignore
This commit is contained in:
parent
b099a40bc1
commit
685d21bee2
|
|
@ -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[@]}
|
||||
|
|
|
|||
Loading…
Reference in a new issue