devshell: remove unneeded PS1_util
It's already present in upstream:
67cce7359e/modules/devshell.nix (L425-L441)
This commit is contained in:
parent
fc7e21beaf
commit
821c75f505
|
@ -11,23 +11,6 @@ in
|
|||
name = "tritonshell";
|
||||
|
||||
devshell.interactive = {
|
||||
PS1_util = pkgs.lib.noDepEntry ''
|
||||
if [[ -n "''${PRJ_ROOT:-}" ]]; then
|
||||
# Print the path relative to $PRJ_ROOT
|
||||
rel_root() {
|
||||
local path
|
||||
path=$(${pkgs.coreutils}/bin/realpath --relative-to "$PRJ_ROOT" "$PWD")
|
||||
if [[ $path != . ]]; then
|
||||
echo " $path "
|
||||
fi
|
||||
}
|
||||
else
|
||||
# If PRJ_ROOT is unset, print only the current directory name
|
||||
rel_root() {
|
||||
echo " \W "
|
||||
}
|
||||
fi
|
||||
'';
|
||||
PS1.text = ''
|
||||
PS1='\[\033[38;5;202m\][$SDC_ACCOUNT@$TRITON_DC]$(rel_root)\$ \[\033[0m\]'
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue