0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

style(acs): fix style and gitignore __pycache__ folder

This commit is contained in:
Marc Cornellà 2021-12-28 17:46:35 +01:00
parent d806649028
commit c4be9294f2
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
2 changed files with 6 additions and 4 deletions

1
plugins/aliases/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
__pycache__

View file

@ -2,9 +2,10 @@
# #
# - acs: alias cheatsheet # - acs: alias cheatsheet
# group alias by command, pass addition argv to grep. # group alias by command, pass addition argv to grep.
ALIASES_PLUGIN_ROOT=$(cd `dirname $0` && pwd)
function acs(){ function acs(){
which python >>/dev/null (( $+commands[python] )) || {
[[ $? -eq 1 ]] && echo "[error]no python executable detected!" && return echo "[error] No python executable detected"
alias | python $ALIASES_PLUGIN_ROOT/cheatsheet.py $@ return
}
alias | python ${functions_source[$0]:h}/cheatsheet.py $@
} }