parent
aa75eeea33
commit
4fcf52c2b1
2 changed files with 46 additions and 36 deletions
@ -1,11 +1,14 @@ |
|||||||
# with lots of 3rd-party amazing aliases installed, just need something to explore it quickly. |
# Handle $0 according to the standard: |
||||||
# |
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html |
||||||
# - acs: alias cheatsheet |
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" |
||||||
# group alias by command, pass addition argv to grep. |
0="${${(M)0:#/*}:-$PWD/$0}" |
||||||
function acs(){ |
|
||||||
(( $+commands[python3] )) || { |
eval ' |
||||||
echo "[error] No python executable detected" |
function acs(){ |
||||||
return |
(( $+commands[python3] )) || { |
||||||
|
echo "[error] No python executable detected" |
||||||
|
return |
||||||
|
} |
||||||
|
alias | python3 "'"${0:h}"'/cheatsheet.py" "$@" |
||||||
} |
} |
||||||
alias | python3 ${functions_source[$0]:h}/cheatsheet.py $@ |
' |
||||||
} |
|
||||||
|
|||||||
Loading…
Reference in new issue