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

Re: "Bug" in promptnl



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



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