X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;ds=sidebyside;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fglobalias%2FREADME.md;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fglobalias%2FREADME.md;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=cd7fc3cb2d432cfee2e5ed2e9ebf2ac863472eca;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/globalias/README.md b/stow/oh-my-zsh/.oh-my-zsh/plugins/globalias/README.md deleted file mode 100644 index cd7fc3c..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/globalias/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Globalias plugin - -Expands all glob expressions, subcommands and aliases (including global). - -Idea from: https://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html. - -## Usage - -Add `globalias` to the plugins array in your zshrc file: - -```zsh -plugins=(... globalias) -``` - -Then just press `SPACE` to trigger the expansion of a command you've written. - -If you only want to insert a space without expanding the command line, press -`CTRL`+`SPACE`. - -if you would like to filter out any values from expanding set `GLOBALIAS_FILTER_VALUES` to -an array of said values. See [Filtered values](#filtered-values). - -## Examples - -#### Glob expressions - -``` -$ 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 - -``` -$ 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' - -$ lG -# expands to -$ ls --color=auto -lah | grep --color=auto -P -``` - -``` -# .zsrc: -alias S="sudo systemctl" - -$ S -# expands to: -$ sudo systemctl -``` - -#### Filtered values - -``` -# .zshrc -alias l='ls -lh' -alias la='ls --color=auto -lah' -GLOBALIAS_FILTER_VALUES=(l) - -$ l -# does not expand -$ la -# expands to: -$ ls --color=auto -lah -```