Skip to content

Commit

Permalink
Fix quoting bug in history completion
Browse files Browse the repository at this point in the history
Fixes #393.
  • Loading branch information
marlonrichert committed Jan 3, 2022
1 parent 18a9bfb commit 06b887a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/completion/_autocomplete.history_lines
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ _autocomplete.history_lines() {
fi
if [[ -o histfindnodups ]]; then
while (( $#events[@] < max_lines && 0 < histno && histno < HISTNO )); do
# -v's arg is a literal string, so we need to escape glob chars.
[[ -v history[$histno] && ! -v events[${(b)history[$histno]}] ]] &&
# -v's arg is a literal string, so we need to quote all characters.
[[ -v history[$histno] && ! -v events[${(q)history[$histno]}] ]] &&
events[$history[$histno]]=$histno
(( histno += inc ))
done
Expand Down

0 comments on commit 06b887a

Please sign in to comment.