-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nl.zsh-theme
44 lines (34 loc) · 883 Bytes
/
nl.zsh-theme
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
#
# NL ZSH Theme
#
# Author: Nikolay Lebedev, github/nlebedevinc
# License: MIT
#
if [[ "$USER" == "root" ]]: then
CARETCOLOR="red"
elif [[ "$NL_THEME_MODE" == "dark" ]]; then
CARETCOLOR="white"
elif
CARETCOLOR="black"
fi
# cypher
# PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . %{${fg[red]}%}%? )%{${fg[blue]}%}»%{${reset_color}%} "
PROMPT='$(user_info)$(current_dir)$(vcs_prompt_info)$(current_caret)'
PROMPT2='. '
_return_status="%(?..%{$fg[red]%}%? ⚠️%{$reset_color%})"
# This function shows user in the PROMPT if needed
function user_info {
if [[ ! -z "$NL_DEFAULT_USER" ]] && [[ "$USER" != "$NL_DEFAULT_USER" ]]; then
echo "@$USER"
fi
}
# Current directory in the PROMPT
function current_dir {
echo "%{$fg_bold[green]%}%~%{$reset_color%}"
}
function vcs_prompt_info {
git_prompt_info
}
function vcs_status {
git_prompt_status
}