X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=.profile.d%2Faliases.sh;h=103b795174f19fd1d4c7020d0a45ad50779d221b;hb=22072cded51c50548aa955366c67edc44a46fcce;hp=3ee83b7f206b561e5c1e5e1922b97fca2e6e8d3a;hpb=91523915df9d9eaecf40125db37fd988f2aef476;p=home.git diff --git a/.profile.d/aliases.sh b/.profile.d/aliases.sh index 3ee83b7..103b795 100644 --- a/.profile.d/aliases.sh +++ b/.profile.d/aliases.sh @@ -11,7 +11,6 @@ alias gdb='gdb --quiet' alias gdbtui='gdbtui --quiet' alias nohist='export HISTFILE=/dev/null' alias kpdf='okular' -alias ipython='ipython --no-banner --no-confirm-exit --pdb --nosep --PromptManager.in_template=">>> " --PromptManager.out_template="" --PromptManager.justify=False' if command -v elinks >/dev/null ; then alias links='elinks -default-mime-type text/html' alias lynx=links @@ -36,6 +35,35 @@ alias xine='xine -l' alias wol-vapier='wakeonlan -i 192.168.1.255 00:25:22:64:19:79; wakeonlan -i 192.168.0.255 00:25:22:64:19:79' +_ipython() { + # These guys keep changing their CLI because they hate their users. + local cmd=$1; shift + local args=( + --no-banner + --no-confirm-exit + --pdb + --nosep + --term-title + --pprint + ) + + case $(command ${cmd} --version) in + 0*) ;; + [123]*) + args+=( + --PromptManager.in_template='>>> ' + --PromptManager.out_template='' + --PromptManager.justify=False + ) + ;; + esac + + command ${cmd} "${args[@]}" "$@" +} +ipython() { _ipython ${FUNCNAME}; } +ipython2() { _ipython ${FUNCNAME}; } +ipython3() { _ipython ${FUNCNAME}; } + adk_path() { local adk=/usr/local/src/android/adk/current/sdk PATH+=":${adk}/tools:${adk}/platform-tools"