From 791a450fdcd18484e7417bf124a2c1f577b4a16e Mon Sep 17 00:00:00 2001 From: wancat Date: Sat, 26 Aug 2023 12:14:47 +0800 Subject: [PATCH 1/2] fix: remove the trailing '%' before prompt https://github.com/xtermjs/xterm.js/issues/2564 https://unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol https://zsh.sourceforge.io/Doc/Release/Options.html --- quests/helloworld/home/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quests/helloworld/home/.zshrc b/quests/helloworld/home/.zshrc index 92044b5..2e98e41 100644 --- a/quests/helloworld/home/.zshrc +++ b/quests/helloworld/home/.zshrc @@ -1,9 +1,9 @@ -PROMPT='%n@%m:%~%# ' +PROMPT='%F{2}%n%f:%~ $ ' unsetopt CASE_GLOB setopt CHASE_LINKS emulate bash -typeset -A cmd +set +o prompt_cr preexec() { export CMD_START_TIME=$(date +%s%N) # capture start time From b0cc7bb3fb8bdb6092e41e52c513fec22a232a04 Mon Sep 17 00:00:00 2001 From: wancat Date: Sat, 26 Aug 2023 12:34:36 +0800 Subject: [PATCH 2/2] feat: update prompt color --- quests/helloworld/home/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quests/helloworld/home/.zshrc b/quests/helloworld/home/.zshrc index 2e98e41..f2835f7 100644 --- a/quests/helloworld/home/.zshrc +++ b/quests/helloworld/home/.zshrc @@ -1,4 +1,4 @@ -PROMPT='%F{2}%n%f:%~ $ ' +PROMPT='%F{2}%n%f:%F{6}%~%f $ ' unsetopt CASE_GLOB setopt CHASE_LINKS emulate bash