From 167cd2fc32a61074f251fd3aae445406b0c6e95a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 30 Apr 2022 18:27:42 +0200 Subject: [PATCH] Improve terminal pwd title by shortening home to ~ --- modules/terminal-life/zsh/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 200826ba..f53dc79b 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -84,7 +84,8 @@ in stty erase '^?' precmd () { - echo -e "\e]2;$(pwd)\e\\" + DIR_NAME=$(pwd | sed "s|^$HOME|~|g") + echo -e "\e]2;$DIR_NAME\e\\" } # If a command is not found, show me where it is