Skip to content

Commit

Permalink
Fix infinite loop in recent paths completion
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Jun 5, 2024
1 parent 3b68cf4 commit 710752f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Completions/_autocomplete__recent_paths
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for singular plural in directory directories file files; do
_comp_tags+=" $tag"
_description -V "$tag" expl "recent $singular"

for (( i = 1 ; i <= $#files, compstate[list_lines] < _autocomplete__max_lines ; i++ )); do
for (( i = 1 ; i <= $#files && compstate[list_lines] < _autocomplete__max_lines ; i++ )); do
displ=( "$files[i]" )
compadd -U "$expl[@]" -d displ -P "${${displ[1]:h}%/}/" -fW "${${files[i]:h}%/}/" \
-- "$files[i]:t" &&
Expand Down

0 comments on commit 710752f

Please sign in to comment.