simnalamburt / Zsh Expand All
Licence: other
🐚 Automatically expands all glob expressions, subcommands, and aliases
Stars: ✭ 13
Programming Languages
shell
77523 projects
zsh-expand-all
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.
Examples
Glob expressions
$ 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
Subcommands
$ mkdir "`date -R`"
# expands to
$ mkdir Tue,\ 04\ Oct\ 2016\ 13:54:03\ +0300
Aliases
# .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
Disabling certain features with 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
References
This project was forked from globalias of Oh My Zsh.
- zshmisc, Christian 'strcat' Schneider
- ZSH Abbreviations, Matt Foster, 2009-01-23
- Cloning vim's abbreviation feature, Mikachu, 2011-04-22
- Automatically Expanding zsh Global Aliases As You Type, Pat Regan, 2011-07-08
- Automatically Expanding zsh Global Aliases - Simplified, Pat Regan, 2012-11-04
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].