From 38b24661d64d7ea0e93e6109cec0e73a2beeebd6 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 11 Jan 2018 13:37:01 +0100 Subject: [PATCH] deprecated pp, ppp now uses bpython with python3 as fallback --- etc/zsh/zshrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index d129dc3..256d289 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -6,8 +6,6 @@ alias ll="l --almost-all" alias grep="grep --text --color=auto" alias pull_website="wget --no-parent --recursive --page-requisites --convert-links --html-extension --no-clobber" alias ..="cd .." -alias pp=python2 -alias ppp=python3 alias htop="htop --delay=3" alias O=xdg-open alias gits="git status" @@ -24,6 +22,17 @@ alias units="units -v" alias usystemctl="systemctl --user" alias battery="upower -i /org/freedesktop/UPower/devices/battery_BAT0" +ppp () { + which bpython > /dev/null + if [ $? == 0 ]; then + bpython "$@" + else + python3 "$@" + fi +} + +alias pp=ppp + # apparently this is the only way of setting GNU Screen to UTF-8 alias screen="screen -U"