We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1326474 commit 76ee1c2Copy full SHA for 76ee1c2
completions/ARRAY
@@ -166,9 +166,8 @@ _comp_uniq()
166
_comp_last_index()
167
{
168
local -n _comp_last_index__array=$1 _comp_last_index__ret=$2
169
- local -i _comp_last_index__i
170
- for _comp_last_index__i in "${!_comp_last_index__array[@]}"; do :; done
171
- _comp_last_index__ret=$_comp_last_index__i
+ local -a _comp_last_index__indices=("${!_comp_last_index__array[@]}")
+ _comp_last_index__ret=${_comp_last_index__indices[*]: -1}
172
}
173
174
_comp_compact()
0 commit comments