From a328879bb0dd5e26e3a26641e6b7c5c9ed572095 Mon Sep 17 00:00:00 2001 From: Marlon Richert Date: Tue, 13 Apr 2021 23:09:54 +0300 Subject: [PATCH] Remove stray space from history search results --- completion/_autocomplete.history_lines | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completion/_autocomplete.history_lines b/completion/_autocomplete.history_lines index d03deff0..756ab7f0 100644 --- a/completion/_autocomplete.history_lines +++ b/completion/_autocomplete.history_lines @@ -64,7 +64,7 @@ _autocomplete.history_lines() { matches=( "${(@)events[@]#<->:}" ) [[ $curcontext == *-incremental-* ]] && - matches=( "${(@)${(@)matches[@]##$lbuffer}%%$rbuffer}" ) + matches=( "${(@)${(@)matches[@]##${lbuffer}[[:space:]]#}%%[[:space:]]#${rbuffer}}" ) local _comp_no_ignore=1 expl _description -2V $tag expl 'history line'