diff options
author | hqingyi <huangb.qingy@gmail.com> | 2021-06-12 10:45:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 19:45:05 -0700 |
commit | e47a8e2321be9e7af49872588619c031a757d6ea (patch) | |
tree | 3e7f70f74d233ed6313fd7a660abd31f0fd377f5 /plugins/aliases/aliases.plugin.zsh | |
parent | a206271460ce49e842b1b410c0424b8c9a0a3d14 (diff) | |
download | zsh-e47a8e2321be9e7af49872588619c031a757d6ea.tar.gz zsh-e47a8e2321be9e7af49872588619c031a757d6ea.tar.bz2 zsh-e47a8e2321be9e7af49872588619c031a757d6ea.zip |
feat(plugins): add aliases cheatsheet plugin (#4662)
* add: explore alias quickly with aliases plugin.
* change: add compatibility with python2 & python3.
- add compatibility.
- add termcolor.py.
- remove aliass(search), just use acs.
- detect python.
Diffstat (limited to 'plugins/aliases/aliases.plugin.zsh')
-rw-r--r-- | plugins/aliases/aliases.plugin.zsh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/aliases/aliases.plugin.zsh b/plugins/aliases/aliases.plugin.zsh new file mode 100644 index 000000000..28d8fba24 --- /dev/null +++ b/plugins/aliases/aliases.plugin.zsh @@ -0,0 +1,10 @@ +# with lots of 3rd-party amazing aliases installed, just need something to explore it quickly. +# +# - acs: alias cheatsheet +# group alias by command, pass addition argv to grep. +ALIASES_PLUGIN_ROOT=$(cd `dirname $0` && pwd) +function acs(){ + which python >>/dev/null + [[ $? -eq 1 ]] && echo "[error]no python executable detected!" && return + alias | python $ALIASES_PLUGIN_ROOT/cheatsheet.py $@ +} |