From 393302373bb0c8afae5dfa6f1674650aaccea4e8 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 2 May 2022 01:23:41 +0200 Subject: [PATCH] zsh: precmd() don't echo trailing newline --- 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 aaedac92..fd40836a 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -85,7 +85,8 @@ in stty erase '^?' precmd () { - echo -e -n "\e]2;$(pwd)\e\\" + DIR_NAME=$(pwd | sed "s|^$HOME|~|g") + echo -e -n "\e]2;$DIR_NAME\e\\" } # If a command is not found, show me where it is