We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41108ea commit d45f45bCopy full SHA for d45f45b
modules/devshell.nix
@@ -409,7 +409,13 @@ in
409
410
# Set a cool PS1
411
PS1 = stringAfter [ "PS1_util" ] (lib.mkDefault ''
412
- PS1='\[\033[38;5;202m\][${cfg.name}]$(rel_root)\$\[\033[0m\] '
+ __set_prompt() {
413
+ PS1='\[\033[38;5;202m\][${cfg.name}]$(rel_root)\$\[\033[0m\] '
414
+ }
415
+ # Only set the prompt when entering a nix shell, since nix shells
416
+ # always reset to plain bash, otherwise respect the user's preferences
417
+ [[ -n "''${IN_NIX_SHELL:-}" ]] && __set_prompt
418
+ unset -f __set_prompt
419
'');
420
};
421
0 commit comments