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 288b4bd commit 5419dc1Copy full SHA for 5419dc1
modules/devshell.nix
@@ -245,8 +245,7 @@ in
245
};
246
247
interactive = {
248
- PS1 = noDepEntry ''
249
- # Set a cool PS1
+ PS1_util = noDepEntry ''
250
if [[ -n "''${DEVSHELL_ROOT:-}" ]]; then
251
# Print the path relative to $DEVSHELL_ROOT
252
rel_root() {
@@ -262,8 +261,12 @@ in
262
261
echo " \W "
263
}
264
fi
265
- PS1='\[\033[38;5;202m\][${cfg.name}]$(rel_root)\$\[\033[0m\] '
266
'';
+
+ # Set a cool PS1
267
+ PS1 = stringAfter [ "PS1_util" ] (lib.mkDefault ''
268
+ PS1='\[\033[38;5;202m\][${cfg.name}]$(rel_root)\$\[\033[0m\] '
269
+ '');
270
271
272
# Use a naked derivation to limit the amount of noise passed to nix-shell.
0 commit comments