1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00

README for globalias

This commit is contained in:
slavaGanzin 2016-10-04 14:03:37 +03:00
parent 86126233bb
commit 75f87dd24e
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,37 @@
#Globalias
Expands all globes, backtick expressions and aliases(including global).
```
$ touch {1..10}<space>
#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'
$ l<space>G<space>
#expands to
$ ls --color=auto -lah | grep --color=auto -P
ls **/*.json<space>
#expands to
ls folder/file.json anotherfolder/another.json
```
####Returns autocompletion to your custom aliases:
```
#.zsrc
alias S="sudo systemctl"
$ S<space>
#expands to:
sudo systemctl s<tab>
#trigger autocompletion
```

View file

@ -12,3 +12,6 @@ bindkey -M viins " " globalias
# control-space to make a normal space # control-space to make a normal space
bindkey -M emacs "^ " magic-space bindkey -M emacs "^ " magic-space
bindkey -M viins "^ " magic-space bindkey -M viins "^ " magic-space
# normal space during searches
bindkey -M isearch " " magic-space