Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simnalamburt/zsh-expand-all
:shell: Automatically expands all glob expressions, subcommands, and aliases
https://github.com/simnalamburt/zsh-expand-all
Last synced: 30 days ago
JSON representation
:shell: Automatically expands all glob expressions, subcommands, and aliases
- Host: GitHub
- URL: https://github.com/simnalamburt/zsh-expand-all
- Owner: simnalamburt
- License: other
- Created: 2018-04-08T14:48:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-19T11:08:56.000Z (over 4 years ago)
- Last Synced: 2024-08-07T18:44:24.352Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 21
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
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.
```zsh
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
```console
$ touch {1..10}
# expands to
$ touch 1 2 3 4 5 6 7 8 9 10$ ls **/*.json
# expands to
$ ls folder/file.json anotherfolder/another.json
```#### Subcommands
```console
$ mkdir "`date -R`"
# expands to
$ mkdir Tue,\ 04\ Oct\ 2016\ 13:54:03\ +0300```
#### Aliases
```console
# .zshrc:
alias -g G="| grep --color=auto -P"
alias l='ls --color=auto -lah'$ lG
# expands to
$ ls --color=auto -lah | grep --color=auto -P
``````console
# .zsrc:
alias S="sudo systemctl"$ S
# 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
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](http://strcat.de/dotfiles/dot.zshmisc),
Christian 'strcat' Schneider
- [ZSH Abbreviations](https://hackerific.net/2009/01/23/zsh-abbreviations/),
Matt Foster, 2009-01-23
- [Cloning vim's abbreviation feature](http://zshwiki.org/home/examples/zleiab),
Mikachu, 2011-04-22
- [Automatically Expanding zsh Global Aliases As You Type](https://blog.patshead.com/2011/07/automatically-expanding-zsh-global-aliases-as-you-type.html),
Pat Regan, 2011-07-08
- [Automatically Expanding zsh Global Aliases - Simplified](https://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html),
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.[global aliases]: http://www.zshwiki.org/home/examples/aliasglobal
[zinit]: https://github.com/zdharma/zinit
[globalias]: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/globalias
[MIT license]: LICENSE-MIT
[Apache License (Version 2.0)]: LICENSE-APACHE
[COPYRIGHT]: COPYRIGHT