color Python prompt

This commit is contained in:
Martinez 2018-01-11 01:10:20 +01:00
parent fd140cd9af
commit 600f5006e8
2 changed files with 14 additions and 0 deletions

View file

@ -185,6 +185,7 @@ autoload colors zsh/terminfo
# app-shells/over-env
source /usr/lib/over/env/prompt-init
export PYTHONSTARTUP="/usr/lib/over/env/python-startup.py"
# keyboard stuff
bindkey "\e[1~" beginning-of-line

13
lib/python-startup.py Executable file
View file

@ -0,0 +1,13 @@
#! /usr/bin/env python3
# encoding: utf-8
import datetime
import sys
try:
import over
sys.ps1 = over.text.render("<G>>>> <.>")
sys.ps2 = over.text.render("<g>... <.>")
except:
sys.ps1 = '\x1b[1;32m>>> \x1b[0m'
sys.ps2 = '\x1b[0;32m... \x1b[0m'