Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.2-test-1



On Sun, 4 Dec 2016 09:19:41 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Dec 4,  5:08pm, Peter Stephenson wrote:
> } Subject: Re: zsh 5.2-test-1
> }
> } > 14:34:54 @@ -1 +1 @@
> } > 14:34:54 -foo:1: 1: no arguments given
> } > 14:34:54 +%  
> } >  
> } > %  
> } >  
> } > foo:1: 1: no arguments given
> } 
> } I would guess this is some I/O oddity
> 
> Looks more to me as if PS1 is being restored despite the assignment to
> PROMPT, possibly because PS1 has been exported into the environment by
> the test harness?

Oh, that "+" in the diff might refer to all the following lines, in
which case you're probably right.

We don't really care about any leading prompt anyway...

diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 834550c..9ae6d0b 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -97,7 +97,8 @@
 
   PROMPT="" $ZTST_testdir/../Src/zsh -fis <<<'
   unsetopt PROMPT_SP
-  PS2="" PS3="" PS4="" RPS1="" RPS2=""
+  PS1="" PS2="" PS3="" PS4="" RPS1="" RPS2=""
+  exec 2>&1
   foo() {
       print ${1:?no arguments given}
       print not reached
@@ -106,7 +107,7 @@
   print reached
   '
 0:interactive shell returns to top level on ${...?...} error
-?foo:1: 1: no arguments given
+*>*foo:1: 1: no arguments given
 >reached
 
   print ${set1:+word1} ${set1+word2} ${null1:+word3} ${null1+word4}



Messages sorted by: Reverse Date, Date, Thread, Author