Coloring the C-Shell Prompt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
set   black = "%{\033[0;30m%}"
set Bblack = "%{\033[B;30m%}"
set red = "%{\033[0;31m%}"
set Bred = "%{\033[1;31m%}"
set green = "%{\033[0;32m%}"
set Bgreen = "%{\033[1;32m%}"
set yellow = "%{\033[0;33m%}"
set Byellow = "%{\033[1;33m%}"
set blue = "%{\033[0;34m%}"
set Bblue = "%{\033[1;34m%}"
set purple = "%{\033[0;35m%}"
set Bpurple = "%{\033[1;35m%}"
set cyan = "%{\033[0;36m%}"
set Bcyan = "%{\033[1;36m%}"
set white = "%{\033[0;37m%}"
set Bwhite = "%{\033[1;37m%}"
set end = "%{\033[0m%}"

alias setprompt 'set prompt = "\n${cyan}%~\n${Bpurple}%n@%m${Bwhite}[`id -ng`]${end} "'
alias cd 'chdir \!* && setprompt'
setprompt