diff options
author | Leonardo Santiago <[email protected]> | 2024-05-06 22:12:03 -0300 |
---|---|---|
committer | Leonardo Santiago <[email protected]> | 2024-05-06 22:12:43 -0300 |
commit | 323bc219238e3c4e37754a926495b9315f0c1857 (patch) | |
tree | 1d7a9f9f92679f7bd307fc345d284860c7a665d8 /users/leonardo.nix | |
parent | a2d8f693fb9556c7e9cf7ba954ad5688aceb9cf5 (diff) |
handle term type as dumb to not complicate terminal
Diffstat (limited to 'users/leonardo.nix')
-rw-r--r-- | users/leonardo.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/users/leonardo.nix b/users/leonardo.nix index 064fcb1..16a0141 100644 --- a/users/leonardo.nix +++ b/users/leonardo.nix @@ -32,7 +32,6 @@ enableCompletion = true; promptInit = '' - PS1="\e[0;95m\[[\h]\]\e[0m \e[0;32m\[\w\]\e[0m :: " vterm_printf() { if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ]); then # Tell tmux to pass the escape sequences through @@ -47,7 +46,17 @@ vterm_prompt_end(){ vterm_printf "51;A$(whoami)@$(hostname):$(pwd)" } - PS1=$PS1'\[$(vterm_prompt_end)\]' + case "$TERM" in + "dumb") + PS1="> " + ;; + xterm*|rxvt*|eterm*|screen*) + PS1="\e[0;95m\[[\h]\]\e[0m \e[0;32m\[\w\]\e[0m :: '\[$(vterm_prompt_end)\]'" + ;; + *) + PS1="> " + ;; + esac ''; }; fonts = { |