From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27037 invoked by alias); 5 Dec 2010 21:10:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28480 Received: (qmail 15783 invoked from network); 5 Dec 2010 21:10:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.212.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Ge0oVYKTZfU3ipQg3GlE0RR7HVXOvoYniRC35aPh6Hc=; b=pYHOfIjO9BxErZN2QmWLbY/9SfSsiX9QnWErXdaq6+5vBvRibwkFfmrZliY8AYkCfy QbxKtZMZQsqkcWwOKAtn+e7fwt6ZqeJkXB3K45AZrUpPMNGRlCdeKPLouDNhqCmRUPlV 3SynWwItPUWsMqYUWezNAZVuVM8GIlDfL0hOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aUogZU+ffDNzQdhzYd4T/3kMfbgUlkTi1Ms41BkbRFn6r7A3zFPpmyHh/ovOKfPV+K ANNdiLH5DOc1Zy3/Jr+3C7+XHjW8/LAFnEWuWJs1FAmuriw/7RfcMnUUm68LSYO43sAt y+sHsJTPUqTBHEatjBHnP1Hnb4OWeK/hdnKR4= MIME-Version: 1.0 Date: Sun, 5 Dec 2010 22:10:54 +0100 Message-ID: Subject: PROMPT_SP and empty PROMPT_EOL_MARK From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 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