Skip to content

Commit

Permalink
Do not disable shellcheck 2206 and 2068 in _forgit_ignore (#382)
Browse files Browse the repository at this point in the history
Shellcheck 2206 and 2068 have been disabled in _forgit_ignore for a very long time. The code that triggers the shellchecks was added in ce240ac before the shellcheck action had been added. The shellcheck for the lines in question got disabled in c14ce93. Disabling shellcheck does not seem necessary, instead this commit implements the fixes shellcheck suggest.
  • Loading branch information
sandr01d authored Apr 13, 2024
1 parent 1c34d0d commit d240263
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,7 @@ _forgit_ignore() {
--preview=\"$FORGIT ignore_preview {2}\"
$FORGIT_IGNORE_FZF_OPTS
"
# shellcheck disable=SC2206
args=($@)
args=("$@")
if [[ $# -eq 0 ]]; then
args=()
while IFS='' read -r arg; do
Expand All @@ -915,8 +914,7 @@ _forgit_ignore() {
FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $2}')
fi
[ ${#args[@]} -eq 0 ] && return 1
# shellcheck disable=SC2068
_forgit_ignore_get ${args[@]}
_forgit_ignore_get "${args[@]}"
}
_forgit_ignore_update() {
if [[ -d "$FORGIT_GI_REPO_LOCAL" ]]; then
Expand Down

0 comments on commit d240263

Please sign in to comment.