From 84fa70513f1aa6a31d1466c75da60adc28834cfb 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 f9acb23..a914a53 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