aboutsummaryrefslogtreecommitdiff
path: root/ksh
diff options
context:
space:
mode:
Diffstat (limited to 'ksh')
-rw-r--r--ksh/kshrc.d/prompt.ksh7
1 files changed, 6 insertions, 1 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 8b460136..2ebe1099 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -81,8 +81,13 @@ function prompt {
} >/dev/null 2>&1
+ # Play ball with ksh's way of escaping non-printing characters
+ typeset es nl
+ es=$(printf '\00')
+ nl=$(printf '\n')
+
# String it all together
- PS1="${format}${PS1}${reset}"' '
+ PS1="${es}${nl}${es}${format}${es}${PS1}${es}${reset}${es}"' '
PS2='> '
PS3='? '
PS4='+<$?> $LINENO:'