From 27efdc8dab4be9f9662b4990e81913ec3766193c Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 15 Aug 2005 03:29:10 +0000 Subject: More adjustements for PROMPT_SP --- Functions/Prompts/prompt_bart_setup | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Functions/Prompts/prompt_bart_setup') 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)) -- cgit 1.4.1