summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2005-08-15 03:29:10 +0000
committerBart Schaefer <barts@users.sourceforge.net>2005-08-15 03:29:10 +0000
commit27efdc8dab4be9f9662b4990e81913ec3766193c (patch)
tree9ead727b506328d39f08450823dfb9050df15349
parent495f177f3aa8922073abf86ba1913119e180054f (diff)
downloadzsh-27efdc8dab4be9f9662b4990e81913ec3766193c.tar.gz
zsh-27efdc8dab4be9f9662b4990e81913ec3766193c.zip
More adjustements for PROMPT_SP
-rw-r--r--Functions/Prompts/prompt_bart_setup11
1 files changed, 7 insertions, 4 deletions
diff --git a/Functions/Prompts/prompt_bart_setup b/Functions/Prompts/prompt_bart_setup
index b1a90e51c..c09ec64df 100644
--- a/Functions/Prompts/prompt_bart_setup
+++ b/Functions/Prompts/prompt_bart_setup
@@ -31,8 +31,8 @@ prompt_bart_help () {
nonzero, or underlined if the job was stopped.
If the last command is too wide to fit without truncating the
- current directory, it is put on a line by itself. The current
- directory uses %~, so namedir abbreviation applies.
+ current directory, it is put on a middle line by itself. The
+ current directory uses %~, so namedir abbreviation applies.
The "upper right prompt" looks like:
date time
@@ -81,8 +81,11 @@ prompt_bart_precmd () {
# Reset the truncation widths for upcoming computations
((PSCOL == 1)) || { PSCOL=1 ; prompt_bart_ps1 }
if [[ -o promptcr ]]
- then print -nPu 2 "${(l.COLUMNS.. .)}\e[s${(pl.COLUMNS..\b.)}%E\e[u"
- else IFS='[;' read -s -d R escape\?$'\e[6n' lineno PSCOL
+ then
+ # Emulate the 4.3.x promptsp option if it isn't available
+ eval '[[ -o promptsp ]] 2>/dev/null' ||
+ print -nP "${(l.COLUMNS.. .)}\e[s${(pl.COLUMNS..\b.)}%E\e[u" >$TTY
+ else IFS='[;' read -s -d R escape\?$'\e[6n' lineno PSCOL <$TTY
fi
((PSCOL == 1)) || prompt_bart_ps1
((colno = COLUMNS-PSCOL))