e75aa2875eea94fcf7ceb3f246db96cc3bc61a2e

Author
Patrick W. Healy <phealy@phealy.com>
Committer
GitHub <noreply@github.com>
Date

Message

globalias: expand filtering to anywhere in the command (#9338)

Diff

 1diff --git a/plugins/globalias/globalias.plugin.zsh b/plugins/globalias/globalias.plugin.zsh
 2index f8c07ce4356160ec536343f3f3975f7a3ef9899b..d4d40c863b75533b08137232635c6cbd514bf75e 100644
 3--- a/plugins/globalias/globalias.plugin.zsh
 4+++ b/plugins/globalias/globalias.plugin.zsh
 5@@ -1,5 +1,7 @@
 6 globalias() {
 7-   if [[ $GLOBALIAS_FILTER_VALUES[(Ie)$LBUFFER] -eq 0 ]]; then
 8+   # Get last word to the left of the cursor
 9+   local word=${${(A)=LBUFFER}[-1]}
10+   if [[ $GLOBALIAS_FILTER_VALUES[(Ie)$word] -eq 0 ]]; then
11       zle _expand_alias
12       zle expand-word
13    fi