Skip to content

Commit

Permalink
fix(tipc): remove filtered-out elements
Browse files Browse the repository at this point in the history
Since the removal of elements are performed by "${params[@]/$i/}" in
the above loops, the removed elements remain in the array `params` as
empty elements.  Therefore, we need to remove the empty elements by
specifying `-X ''`.  This is a regression by
#887.  These empty
elements were originally automatically dropped by unquoted
${params[@]}.

Reference:
13c28e9#diff-62e0a63a79957c52fe6b79be0a66a987da044839c6bcaeaa725fcd199c4e528fR160
  • Loading branch information
akinomyoga committed Sep 25, 2023
1 parent cc246a1 commit 75b36b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion completions/tipc
Expand Up @@ -153,7 +153,7 @@ _comp_cmd_tipc()
done
done

_comp_compgen -- -W '"${params[@]}"'
_comp_compgen -- -W '"${params[@]}"' -X ''
;;
disable)
((optind++))
Expand Down

0 comments on commit 75b36b2

Please sign in to comment.