forked from pvelder/wlst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidprompt
51 lines (48 loc) · 1.52 KB
/
sidprompt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# sidprompt
# who: Tony van Esch
# what: create a environment specific color to the unix prompt (DTAP)
# when: Wed Jul 17 11:13:00 CEST 2013
# hist: sid prompt stems from an old script used to give Oracle db servers a nice CLI prompt (hence sid)
# call: put it in your .bashrc or caal it from your generic setup script
TXTBLK='\e[0;30m' # Black - Regular
TXTRED='\e[0;31m' # Red
TXTGRN='\e[0;32m' # Green
TXTYLW='\e[0;33m' # Yellow
TXTBLU='\e[0;34m' # Blue
TXTPUR='\e[0;35m' # Purple
TXTCYN='\e[0;36m' # Cyan
TXTWHT='\e[0;37m' # White
BLDBLK='\e[1;30m' # Black - Bold
BLDRED='\e[1;31m' # Red
BLDGRN='\e[1;32m' # Green
BLDYLW='\e[1;33m' # Yellow
BLDBLU='\e[1;34m' # Blue
BLDPUR='\e[1;35m' # Purple
BLDCYN='\e[1;36m' # Cyan
BLDWHT='\e[1;37m' # White
UNDBLK='\e[4;30m' # Black - Underline
UNDRED='\e[4;31m' # Red
UNDGRN='\e[4;32m' # Green
UNDYLW='\e[4;33m' # Yellow
UNDBLU='\e[4;34m' # Blue
UNDPUR='\e[4;35m' # Purple
UNDCYN='\e[4;36m' # Cyan
UNDWHT='\e[4;37m' # White
BAKBLK='\e[40m' # Black - Background
BAKRED='\e[41m' # Red - Background
BAKGRN='\e[42m' # Green - Background
BAKYLW='\e[43m' # Yellow - Background
BAKBLU='\e[44m' # Blue - Background
BAKPUR='\e[45m' # Purple - Background
BAKCYN='\e[46m' # Cyan - Background
BAKWHT='\e[47m' # White - Background
TXTRST='\e[0m' # Text Reset
case $(hostname) in
dev* ) COL=$TXTWHT ;;
tsdt* ) COL=$TXTYLW ;;
uat* ) COL=$TXTGRN ;;
prd* ) COL=$TXTRED ;;
prod* ) COL=$TXTRED ;;
esac
PS1="${COL}[${WL_DOMAIN:-${ORACLE_SID:-WLS domain not set}}] [\u@\h:\w]${TXTRST}\n\[\r\]"
export PS1