From c30c1700f41bb585fa3c0b7983cae74191f2f1d7 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 2 Jul 2023 13:14:08 +0200 Subject: [PATCH] bash: replace $USER with ~ in PROMPT_COMMAND --- modules/terminal-life/bash/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/terminal-life/bash/default.nix b/modules/terminal-life/bash/default.nix index 9528aee9..c8d4eace 100644 --- a/modules/terminal-life/bash/default.nix +++ b/modules/terminal-life/bash/default.nix @@ -19,7 +19,7 @@ in { # Run when initializing an interactive shell initExtra = '' # Show current directory at the top in Alacritty - PROMPT_COMMAND='echo -e -n "\e]2;$(basename "$PWD")\e\\"' + PROMPT_COMMAND='echo -e -n "\e]2;$(basename "$PWD" | sed "s/${psCfg.user.name}/~/")\e\\"' # If a command is not found, show me where it is source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh