From 75f87dd24ec60bd243ffbe7c9dbd1daec5b51ae2 Mon Sep 17 00:00:00 2001 From: slavaGanzin Date: Tue, 4 Oct 2016 14:03:37 +0300 Subject: [PATCH] README for globalias --- plugins/globalias/README.md | 37 ++++++++++++++++++++++++++ plugins/globalias/globalias.plugin.zsh | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 plugins/globalias/README.md diff --git a/plugins/globalias/README.md b/plugins/globalias/README.md new file mode 100644 index 000000000..db2e5bee0 --- /dev/null +++ b/plugins/globalias/README.md @@ -0,0 +1,37 @@ +#Globalias + + +Expands all globes, backtick expressions and aliases(including global). + +``` +$ touch {1..10} +#expands to +$ touch 1 2 3 4 5 6 7 8 9 10 + +$ mkdir "`date -R`" +#expands to +$ mkdir Tue,\ 04\ Oct\ 2016\ 13:54:03\ +0300 + +#.zshrc: +alias -g G="| grep --color=auto -P" +alias l='ls --color=auto -lah' + +$ lG +#expands to +$ ls --color=auto -lah | grep --color=auto -P + +ls **/*.json +#expands to +ls folder/file.json anotherfolder/another.json +``` + +####Returns autocompletion to your custom aliases: +``` +#.zsrc +alias S="sudo systemctl" + +$ S +#expands to: +sudo systemctl s +#trigger autocompletion +``` diff --git a/plugins/globalias/globalias.plugin.zsh b/plugins/globalias/globalias.plugin.zsh index bac657c47..bf4cfc030 100644 --- a/plugins/globalias/globalias.plugin.zsh +++ b/plugins/globalias/globalias.plugin.zsh @@ -12,3 +12,6 @@ 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