Skip to content

🐚 Automatically expands all glob expressions, subcommands, and aliases

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

simnalamburt/zsh-expand-all

Repository files navigation

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

Disabling certain features with $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

References

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.

About

🐚 Automatically expands all glob expressions, subcommands, and aliases

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages