diff options
author | Marc Cornellà <marc.cornella@live.com> | 2016-10-04 14:50:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-04 14:50:28 +0200 |
commit | 7f06a0cd8238747277130334c264b7a679403ba4 (patch) | |
tree | afdad993584cd89c3db20527aacf43ceae4a6e27 /plugins/globalias/globalias.plugin.zsh | |
parent | 3cc61701bd7fd0a3fa6cb3c70f2b927a1e51970a (diff) | |
parent | f701b4de0fb55b71e2cfb17522a08fba741ff170 (diff) | |
download | zsh-7f06a0cd8238747277130334c264b7a679403ba4.tar.gz zsh-7f06a0cd8238747277130334c264b7a679403ba4.tar.bz2 zsh-7f06a0cd8238747277130334c264b7a679403ba4.zip |
Merge pull request #5463 from slavaGanzin/globalias
Fixes #4834
Diffstat (limited to 'plugins/globalias/globalias.plugin.zsh')
-rw-r--r-- | plugins/globalias/globalias.plugin.zsh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/globalias/globalias.plugin.zsh b/plugins/globalias/globalias.plugin.zsh new file mode 100644 index 000000000..9602a9606 --- /dev/null +++ b/plugins/globalias/globalias.plugin.zsh @@ -0,0 +1,17 @@ +globalias() { + zle _expand_alias + zle expand-word + zle self-insert +} +zle -N globalias + +# space expands all aliases, including global +bindkey -M emacs " " globalias +bindkey -M viins " " globalias + +# control-space to make a normal space +bindkey -M emacs "^ " magic-space +bindkey -M viins "^ " magic-space + +# normal space during searches +bindkey -M isearch " " magic-space |