aboutsummaryrefslogtreecommitdiff
path: root/bash/prompt.bash
blob: 9e74155f07fb22610d8c25759d3e2cdd32025b03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# vi:syntax=sh

function prompt_command () {
	local EXIT="$?"
	local REMOTE=""
	local VENV=""

	[ $EXIT -eq 0 ] && EXIT=""
	[ ! -z "$SSH_CONNECTION" ] && REMOTE="${orange}[R] "
	[ -z "$VIRTUAL_ENV" ] || VENV="$(basename "$VIRTUAL_ENV")"
	
	#PS1="\n${REMOTE}${cyan}\h:$(virtualenv_prompt) ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${red}${EXIT} ${reset_color}→ "
	PS1="\n${REMOTE}${cyan}\h: ${reset_color} ${yellow}\w ${green}${VENV}\n${red}${EXIT} ${reset_color}→ "
}

PROMPT_COMMAND=prompt_command