File tree 2 files changed +17
-14
lines changed
2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ themes/command_duration.theme.bash
133
133
themes/easy
134
134
themes/essential
135
135
themes/modern
136
+ themes/norbu
136
137
themes/pete
137
138
themes/powerline
138
139
themes/pure
Original file line number Diff line number Diff line change 1
- #! /usr/bin/env bash
1
+ # shellcheck shell=bash
2
+ # shellcheck disable=SC2034 # Expected behavior for themes.
2
3
3
- function set_prompt_symbol () {
4
- if test $1 -eq 0 ; then
5
- PROMPT_SYMBOL =" >_"
6
- else
7
- PROMPT_SYMBOL =" ${orange} >_${normal} "
8
- fi
4
+ function set_prompt_symbol() {
5
+ if [[ $1 -eq 0 ]] ; then
6
+ prompt_symbol =" >_"
7
+ else
8
+ prompt_symbol =" ${orange? } >_${normal? } "
9
+ fi
9
10
}
11
+
10
12
function prompt_command() {
11
- set_prompt_symbol $?
12
- if test -z " $VIRTUAL_ENV " ; then
13
- PYTHON_VIRTUALENV=" "
14
- else
15
- PYTHON_VIRTUALENV=" ${bold_yellow} [` basename \" $VIRTUAL_ENV \" ` ]"
16
- fi
13
+ local ret_val=" $? " prompt_symbol scm_prompt_info
14
+ if [[ -n " ${VIRTUAL_ENV:- } " ]]; then
15
+ PYTHON_VIRTUALENV=" ${bold_yellow?} [${VIRTUAL_ENV##*/ } ]"
16
+ fi
17
17
18
- PS1=" ${bold_orange}${PYTHON_VIRTUALENV}${reset_color}${bold_green} [\w]${bold_blue} \[$( scm_prompt_info) \]${normal} \n${PROMPT_SYMBOL} "
18
+ scm_prompt_info=" $( scm_prompt_info) "
19
+ set_prompt_symbol " ${ret_val} "
20
+ PS1=" ${bold_orange?}${PYTHON_VIRTUALENV:- }${reset_color?}${bold_green?} [\w]${bold_blue?} [${scm_prompt_info} ]${normal?} \n${prompt_symbol} "
19
21
}
20
22
21
23
# scm themeing
You can’t perform that action at this time.
0 commit comments