44 current 2024-04-18 11:29:51 23.11.20240405.72da83d 6.1.84 *

This commit is contained in:
Jonas Röger 2024-04-18 11:29:58 +02:00
parent 619b9e289a
commit 790e3cb4df

View File

@ -17,6 +17,19 @@ ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_STASHED="(%{$fg_bold[blue]%}✹%{$reset_color%})"
bureau_nix_shell () {
if [ -n "$IN_NIX_SHELL" ]; then
if [ -n "$out" ]; then
local name=$(basename $(realpath -mL "$out/../../"))
echo -n "[nix-shell:$name]"
else
echo -n "[nix-shell]"
fi
else
echo -n ""
fi
}
bureau_git_info () {
local ref
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
@ -127,7 +140,7 @@ bureau_precmd () {
setopt prompt_subst
PROMPT='> $_LIBERTY '
RPROMPT='$(nvm_prompt_info) $(bureau_git_prompt)'
RPROMPT='$(nvm_prompt_info) $(bureau_nix_shell) $(bureau_git_prompt)'
autoload -U add-zsh-hook
add-zsh-hook precmd bureau_precmd