commit 96bffe8d80350e61f0f1c42cb7cac0706cc06a71
parent f32d9a82b1caf365af742f120365dd759860d5e9
Author: hhvn <dev@hhvn.uk>
Date: Sat, 29 May 2021 18:44:25 +0100
.c/k/prompt: add lack of newline handling
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/.config/ksh/prompt b/.config/ksh/prompt
@@ -12,6 +12,9 @@ __prompt_strip(){
}
__ksh_prompt(){
+ __prompt_col 14
+ printf "\[%%%$(echo "$(tput cols) - 1" | bc)s\r\]"
+
errorcode=$1
# tput setaf 10 >/dev/null
[ $errorcode -eq 0 ] && __prompt_col 15 || __prompt_col 10