2 # Get last word to the left of the cursor:
3 # (z) splits into words using shell parsing
4 # (A) makes it an array even if there's only one element
5 local word=${${(Az)LBUFFER}[-1]}
6 if [[ $GLOBALIAS_FILTER_VALUES[(Ie)$word] -eq 0 ]]; then
14 # space expands all aliases, including global
15 bindkey -M emacs " " globalias
16 bindkey -M viins " " globalias
18 # control-space to make a normal space
19 bindkey -M emacs "^ " magic-space
20 bindkey -M viins "^ " magic-space
22 # normal space during searches
23 bindkey -M isearch " " magic-space