1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00

lnl: update nix prompt

This commit is contained in:
Daiderd Jordan 2018-07-08 11:28:08 +02:00
parent 4cd5454f29
commit ca4af74fca
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -203,12 +203,14 @@
programs.zsh.promptInit = ''
autoload -U promptinit && promptinit
if [ -n "$IN_NIX_SHELL" ]; then
PS1='%F{green}%B[nix-shell]%#%b%f '
else
PS1='%B%(?..%? )%b '
fi
RPS1='%F{green}%~%f'
setopt PROMPTSUBST
_prompt_nix() {
[ -z "$IN_NIX_SHELL" ] || echo "%F{yellow}%B[''${name:+$name}]%b%f "
}
PS1='%F{red}%B%(?..%? )%b%f%# '
RPS1='$(_prompt_nix)%F{green}%~%f'
'';
programs.zsh.loginShellInit = ''