75 | 75 |
|
76 | 76 |
if [ -n "$force_color_prompt" ]; then
|
77 | 77 |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
78 | |
# We have color support; assume it's compliant with Ecma-48
|
79 | |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
80 | |
# a case would tend to support setf rather than setaf.)
|
81 | |
color_prompt=yes
|
|
78 |
# We have color support; assume it's compliant with Ecma-48
|
|
79 |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
|
80 |
# a case would tend to support setf rather than setaf.)
|
|
81 |
color_prompt=yes
|
82 | 82 |
else
|
83 | |
color_prompt=
|
|
83 |
color_prompt=
|
84 | 84 |
fi
|
85 | 85 |
fi
|
86 | 86 |
|
|
90 | 90 |
|
91 | 91 |
# enable syntax-highlighting
|
92 | 92 |
if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && [ "$color_prompt" = yes ]; then
|
93 | |
. /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
94 | |
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
95 | |
ZSH_HIGHLIGHT_STYLES[default]=none
|
96 | |
ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=red,bold
|
97 | |
ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold
|
98 | |
ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline
|
99 | |
ZSH_HIGHLIGHT_STYLES[global-alias]=fg=magenta
|
100 | |
ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline
|
101 | |
ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold
|
102 | |
ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline
|
103 | |
ZSH_HIGHLIGHT_STYLES[path]=underline
|
104 | |
ZSH_HIGHLIGHT_STYLES[path_pathseparator]=
|
105 | |
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]=
|
106 | |
ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold
|
107 | |
ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold
|
108 | |
ZSH_HIGHLIGHT_STYLES[command-substitution]=none
|
109 | |
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta
|
110 | |
ZSH_HIGHLIGHT_STYLES[process-substitution]=none
|
111 | |
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta
|
112 | |
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=magenta
|
113 | |
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=magenta
|
114 | |
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
|
115 | |
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold
|
116 | |
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow
|
117 | |
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow
|
118 | |
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow
|
119 | |
ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta
|
120 | |
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta
|
121 | |
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta
|
122 | |
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta
|
123 | |
ZSH_HIGHLIGHT_STYLES[assign]=none
|
124 | |
ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold
|
125 | |
ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold
|
126 | |
ZSH_HIGHLIGHT_STYLES[named-fd]=none
|
127 | |
ZSH_HIGHLIGHT_STYLES[numeric-fd]=none
|
128 | |
ZSH_HIGHLIGHT_STYLES[arg0]=fg=green
|
129 | |
ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold
|
130 | |
ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold
|
131 | |
ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold
|
132 | |
ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold
|
133 | |
ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold
|
134 | |
ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold
|
135 | |
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
|
|
93 |
. /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
94 |
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
|
95 |
ZSH_HIGHLIGHT_STYLES[default]=none
|
|
96 |
ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=red,bold
|
|
97 |
ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold
|
|
98 |
ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline
|
|
99 |
ZSH_HIGHLIGHT_STYLES[global-alias]=fg=magenta
|
|
100 |
ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline
|
|
101 |
ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold
|
|
102 |
ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline
|
|
103 |
ZSH_HIGHLIGHT_STYLES[path]=underline
|
|
104 |
ZSH_HIGHLIGHT_STYLES[path_pathseparator]=
|
|
105 |
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]=
|
|
106 |
ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold
|
|
107 |
ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold
|
|
108 |
ZSH_HIGHLIGHT_STYLES[command-substitution]=none
|
|
109 |
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta
|
|
110 |
ZSH_HIGHLIGHT_STYLES[process-substitution]=none
|
|
111 |
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta
|
|
112 |
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=magenta
|
|
113 |
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=magenta
|
|
114 |
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none
|
|
115 |
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold
|
|
116 |
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow
|
|
117 |
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow
|
|
118 |
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow
|
|
119 |
ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta
|
|
120 |
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta
|
|
121 |
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta
|
|
122 |
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta
|
|
123 |
ZSH_HIGHLIGHT_STYLES[assign]=none
|
|
124 |
ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold
|
|
125 |
ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold
|
|
126 |
ZSH_HIGHLIGHT_STYLES[named-fd]=none
|
|
127 |
ZSH_HIGHLIGHT_STYLES[numeric-fd]=none
|
|
128 |
ZSH_HIGHLIGHT_STYLES[arg0]=fg=green
|
|
129 |
ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold
|
|
130 |
ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold
|
|
131 |
ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold
|
|
132 |
ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold
|
|
133 |
ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold
|
|
134 |
ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold
|
|
135 |
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
|
136 | 136 |
fi
|
137 | 137 |
else
|
138 | 138 |
PROMPT='${debian_chroot:+($debian_chroot)}%n@%m:%~%# '
|
|
155 | 155 |
|
156 | 156 |
# Print a new line before the prompt, but only if it is not the first line
|
157 | 157 |
if [ "$new_line_before_prompt" = yes ]; then
|
158 | |
if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then
|
159 | |
_NEW_LINE_BEFORE_PROMPT=1
|
160 | |
else
|
161 | |
print ""
|
162 | |
fi
|
|
158 |
if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then
|
|
159 |
_NEW_LINE_BEFORE_PROMPT=1
|
|
160 |
else
|
|
161 |
print ""
|
|
162 |
fi
|
163 | 163 |
fi
|
164 | 164 |
}
|
165 | 165 |
|