zsh-users
 help / color / mirror / code / Atom feed
* "Bug" in promptnl
@ 2012-06-06  8:30 René Neumann
  2012-06-06 14:45 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: René Neumann @ 2012-06-06  8:30 UTC (permalink / raw)
  To: zsh-users

Hi,

the following message sometimes is printed after some program finishes
in the shell (I can't really find a pattern on when this happens):

promptnl:65: bad math expression: operand expected at `> 1 '

The offending line should be this:

( ${${RECV#*\;}%R} > 1 )) && print -P -- $EOLMARK

The promptnl is the one from the normal zsh-distribution.

The message is no real problem but just confusing :). Is there an easy
way to fix it? Probably just checking that {${RECV#*\;}%R} does not
evaluate to the empty string, isn't it?

- René


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: "Bug" in promptnl
  2012-06-06  8:30 "Bug" in promptnl René Neumann
@ 2012-06-06 14:45 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2012-06-06 14:45 UTC (permalink / raw)
  To: zsh-users

On Jun 6, 10:30am, René wrote:
} Subject: "Bug" in promptnl
}
} promptnl:65: bad math expression: operand expected at `> 1 '
} 
} The message is no real problem but just confusing :). Is there an easy
} way to fix it? Probably just checking that {${RECV#*\;}%R} does not
} evaluate to the empty string, isn't it?

Wow, 11 years without anyone noticing this?

Index: Functions/Misc/promptnl
===================================================================
diff -u -r1.1.1.1 promptnl
--- Functions/Misc/promptnl     9 Apr 2001 20:14:11 -0000       1.1.1.1
+++ Functions/Misc/promptnl     6 Jun 2012 14:34:18 -0000
@@ -62,7 +62,7 @@
 
  # If the cursor is not in the first column, emit EOLMARK and newline.
   
   -(( ${${RECV#*\;}%R} > 1 )) && print -P -- $EOLMARK
   +(( ${${${RECV#*\;}%R}:-0} > 1 )) && print -P -- $EOLMARK
    
     return 0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-06 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06  8:30 "Bug" in promptnl René Neumann
2012-06-06 14:45 ` Bart Schaefer

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).