Skip to content

Commit f1f5bf8

Browse files
committed
fix(_comp_delimited): nounset mode error on first token
1 parent 59d2322 commit f1f5bf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completion

+1-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ _comp_delimited()
708708
existing=($cur)
709709
# Do not remove the last from existing if it's not followed by the
710710
# delimiter so we get space appended.
711-
[[ $cur == *"$delimiter" ]] || unset "existing[${#existing[@]}-1]"
711+
[[ ! $cur || $cur == *"$delimiter" ]] || unset "existing[${#existing[@]}-1]"
712712
IFS=$ifs
713713
for x in ${existing+"${existing[@]}"}; do
714714
for i in "${!COMPREPLY[@]}"; do

0 commit comments

Comments
 (0)