mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
change: add compatibility with python2 & python3.
- add compatibility. - add termcolor.py. - remove aliass(search), just use acs. - detect python.
This commit is contained in:
parent
fd303f9107
commit
dda7a6b25f
3 changed files with 182 additions and 17 deletions
|
|
@ -1,13 +1,10 @@
|
|||
# with lots of 3rd-party amazing aliases installed, just need something to get it quickly.
|
||||
#
|
||||
# use alias as prefix:
|
||||
# - aliass: search alias
|
||||
# - aliascs: cheatsheet, group alias by command
|
||||
function aliass(){
|
||||
[[ $# -gt 0 ]] && alias | grep $@
|
||||
}
|
||||
|
||||
function aliascs(){
|
||||
local script_root=$(cd `dirname $0` && pwd)
|
||||
alias | python $script_root/cheatsheet.py $@
|
||||
# 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 $@
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue