zsh-workers
 help / color / mirror / code / Atom feed
* broken parsing with $((`:`))
@ 2015-04-15  3:05 Mike Frysinger
  2015-04-15  9:03 ` Peter Stephenson
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2015-04-15  3:05 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

looks like zsh doesn't correctly parse this:
$ zsh -c 'echo $((`:`))'
zsh:1: bad math expression: illegal character: \M-]

a little whitespace makes it happy:
$ zsh -c 'echo $(( `:`))'
0
$ zsh -c 'echo $((`:` ))'
0

same for $():
$ zsh -c 'echo $(($(:)))'
zsh:1: bad math expression: illegal character: \M-]
$ zsh -c 'echo $(( $(:)))'
0
$ zsh -c 'echo $(($(:) ))'
0

looks like it's related to the subshell not outputting anything.
if you use 'echo 0' instead of ':', it works out.

$ zsh --version
zsh 5.0.7 (x86_64-pc-linux-gnu)
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-08-16  1:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  3:05 broken parsing with $((`:`)) Mike Frysinger
2015-04-15  9:03 ` Peter Stephenson
2015-04-15 15:13   ` Bart Schaefer
2015-04-15 15:26     ` Peter Stephenson
2015-04-15 16:23       ` Potential 3.0.8 [was Re: broken parsing with $((`:`))] Bart Schaefer
2015-04-22  9:01         ` Peter Stephenson
2015-04-25 17:14           ` Pre-3.0.8 consolidated PATCH Bart Schaefer
2015-04-25 18:29             ` Axel Beckert
2015-04-25 18:46               ` FIVE-ZERO-EIGHT (was Re: Pre-3.0.8 consolidated PATCH) Bart Schaefer
2015-08-15 23:14             ` bug with expansion and backslashes Oliver Kiddle
2015-08-16  1:22               ` Bart Schaefer
2015-04-15 15:37     ` broken parsing with $((`:`)) Peter Stephenson
2015-04-15 16:13       ` Bart Schaefer
2015-04-15 16:31         ` Peter Stephenson

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