Automatically expands all glob expressions, subcommands, and aliases
OTHER License
This plugin let your zsh automatically expands all glob expressions, subcommands, normal aliases, and global aliases.
Try it with zinit, or your favorite plugin manager.
zinit light simnalamburt/zsh-expand-all
Then just use your zsh as usual. Your aliases will be automatically expanded. If you only want to insert a space without expanding the command line, press ctrl + space.
$ touch {1..10}<space>
# expands to
$ touch 1 2 3 4 5 6 7 8 9 10
$ ls **/*.json<space>
# expands to
$ ls folder/file.json anotherfolder/another.json
$ 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
# .zsrc:
alias S="sudo systemctl"
$ S<space>
# expands to:
$ sudo systemctl
$ZSH_EXPAND_ALL_DISABLE
You can disable certain features with $ZSH_EXPAND_ALL_DISABLE
environment
variable.
ZSH_EXPAND_ALL_DISABLE= # All features are enabled
ZSH_EXPAND_ALL_DISABLE=alias # Disable alias expanding
ZSH_EXPAND_ALL_DISABLE=word # Disable word expanding
ZSH_EXPAND_ALL_DISABLE=alias,word # Disable alias and word expanding
This project was forked from globalias of Oh My Zsh.
zsh-expand-all is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). See COPYRIGHT for details.