Skip to content

Commit d3359a9

Browse files
committed
nix-shell support
1 parent e1cee3f commit d3359a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

themes/gebner.zsh-theme

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ local return_code="%(?..%{$fg[red]%}$return_symbol %? %{$reset_color%})"
1010
local user=
1111
if [ "$USER" != gebner ]; then user='%{$fg[cyan]%}%n%{$fg_bold[blue]%}@%{$reset_color%}'; fi
1212

13-
PROMPT="${user}"'%{${fg[cyan]}%}%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ %{$fg[yellow]%}$(git_prompt_info)$(svn_prompt_info)'"${return_code}"'%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
13+
local in_nix_shell=
14+
if [ "$IN_NIX_SHELL" = 1 ]; then
15+
in_nix_shell='%{$fg_bold[yellow]%}[nix-shell] %{$reset_color%}'
16+
fi
17+
18+
PROMPT="${in_nix_shell}${user}"'%{${fg[cyan]}%}%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ %{$fg[yellow]%}$(git_prompt_info)$(svn_prompt_info)'"${return_code}"'%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
1419

1520
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
1621
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"

0 commit comments

Comments
 (0)