devshell: remove unneeded PS1_util

It's already present in upstream:
67cce7359e/modules/devshell.nix (L425-L441)
This commit is contained in:
jhonas 2024-08-20 12:02:46 +02:00
parent fc7e21beaf
commit 821c75f505
Signed by: teutat3s
GPG key ID: 924889A86D0B0FEB

View file

@ -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\]'
'';