From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: PROMPT_SP and empty PROMPT_EOL_MARK
Date: Sun, 5 Dec 2010 22:10:54 +0100 [thread overview]
Message-ID: <AANLkTikjsQPt5QCCJnFGRJswVq_N=3P+fNnYhCSYdkQ0@mail.gmail.com> (raw)
The recent patches to PROMPT_SP broke my local hacks that removed the
ugly % sign, so I found out about PROMPT_EOL_MARK but why on earth
does it
If not set or empty, the default behavior
is equivalent to the value `%B%S%#%s%b'.
What is the rationale for disallowing an empty indicator? If someone
wants the default they can just unset the parameter.
diff --git a/Src/utils.c b/Src/utils.c
index 8e557fd..8a2db5e 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1285,7 +1285,7 @@ preprompt(void)
char *eolmark = getsparam("PROMPT_EOL_MARK");
char *str;
int percents = opts[PROMPTPERCENT], w = 0;
- if (!eolmark || !*eolmark)
+ if (!eolmark)
eolmark = "%B%S%#%s%b";
opts[PROMPTPERCENT] = 1;
str = promptexpand(eolmark, 1, NULL, NULL, NULL);
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 5d85f58..bec0027 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -1158,7 +1158,7 @@ item(tt(PROMPT_EOL_MARK))(
When the tt(PROMPT_CR) and tt(PROMPT_SP) options are set, the
tt(PROMPT_EOL_MARK) parameter can be used to customize how the end of
partial lines are shown. This parameter undergoes prompt expansion, with
-the tt(PROMPT_PERCENT) option set. If not set or empty, the default
+the tt(PROMPT_PERCENT) option set. If not set, the default
behavior is equivalent to the value `tt(%B%S%#%s%b)'.
)
vindex(PS1)
--
Mikael Magnusson
next reply other threads:[~2010-12-05 21:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-05 21:10 Mikael Magnusson [this message]
2010-12-05 21:41 ` Bart Schaefer
2010-12-05 21:50 ` Wayne Davison
2010-12-06 20:35 ` Greg Klanderman
2010-12-06 20:44 ` Mikael Magnusson
2010-12-06 22:16 ` Greg Klanderman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTikjsQPt5QCCJnFGRJswVq_N=3P+fNnYhCSYdkQ0@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).