Skip to content

🐚 Automatically expands all glob expressions, subcommands, and aliases

Notifications You must be signed in to change notification settings

nemani/zsh-expand-all

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Zprezto Expand Aliases!

This plugin let your zprezto automatically expands all glob expressions, subcommands, normal aliases, and [global aliases].

Clone this repo to .zprezto/modules

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.


About

🐚 Automatically expands all glob expressions, subcommands, and aliases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%