-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
Resolves #370.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,12 +122,21 @@ _autocomplete.history_lines() { | |
# functions -T _autocomplete.history_lines | ||
|
||
_autocomplete.history_lines.suffix() { | ||
case $KEYS in | ||
( [$ZLE_SPACE_SUFFIX_CHARS$ZLE_REMOVE_SUFFIX_CHARS] ) | ||
case $WIDGET in | ||
( (|.|*-)(hist(|ory)|search|delete|kill)(|-*) ) | ||
;; | ||
( (|.)(self-insert(|-*)|magic-space) ) | ||
case $KEYS[-1] in | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
marlonrichert
Author
Owner
|
||
( [$ZLE_SPACE_SUFFIX_CHARS$ZLE_REMOVE_SUFFIX_CHARS] ) | ||
LBUFFER=$LBUFFER[1,-1-$1] | ||
;| | ||
( [$ZLE_SPACE_SUFFIX_CHARS] ) | ||
LBUFFER+=' ' | ||
;; | ||
esac | ||
;; | ||
( * ) | ||
LBUFFER=$LBUFFER[1,-1-$1] | ||
;| | ||
( [$ZLE_SPACE_SUFFIX_CHARS] ) | ||
LBUFFER+=' ' | ||
;; | ||
esac | ||
} | ||
|
Hey @marlonrichert, could you help me understand how this matches for left/right arrow keys?
I would have expected something like
\eOC
and\eOD
to be in$ZLE_SPACE_SUFFIX_CHARS
or$ZLE_REMOVE_SUFFIX_CHARS
, but that's not the case. (well that wouldn't quite work because these strings chars' are each a member of the character class here in[ ]
, whereas\eOC
is more than 1 character, but you get my point)How does this work?