zsh/prompt: add nix-shell indicator
This commit is contained in:
parent
8ff8e65958
commit
1a761b074b
1 changed files with 4 additions and 2 deletions
|
@ -43,8 +43,10 @@ in {
|
||||||
# will be called again by oh-my-zsh
|
# will be called again by oh-my-zsh
|
||||||
enableCompletion = false;
|
enableCompletion = false;
|
||||||
enableAutosuggestions = true;
|
enableAutosuggestions = true;
|
||||||
initExtra = ''
|
initExtra = let
|
||||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||||
|
in ''
|
||||||
|
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||||
RPROMPT=""
|
RPROMPT=""
|
||||||
|
|
||||||
# Automatic rehash
|
# Automatic rehash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue