+_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}; }
+