color Python prompt
This commit is contained in:
parent
fd140cd9af
commit
600f5006e8
2 changed files with 14 additions and 0 deletions
|
@ -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
13
lib/python-startup.py
Executable 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'
|
Loading…
Add table
Add a link
Reference in a new issue