zsh-workers
 help / color / mirror / code / Atom feed
* Inconsistency of GLOB_ASSIGN
@ 2014-11-27  5:57 Bart Schaefer
  2014-11-27 20:43 ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2014-11-27  5:57 UTC (permalink / raw)
  To: zsh-workers

Consider:

torch% print C*
Config
torch% print c*
config.h config.log config.modules config.modules.sh config.status
torch% setopt GLOB_ASSIGN
torch% integer x
torch% x=C*
torch% typeset -p x
typeset -i x=0
torch% x=c*
torch% typeset -p x
typeset -a x
x=(config.h config.log config.modules config.modules.sh config.status)
torch% 

Shouldn't the glob assignment to x have turned it into an array, or at
least into a non-integer scalar, even though there was only one match?

Yes, I know the reason is that "Config" got expanded first and then taken
as a variable name in arithmetic evaluation, therefore defaulting to the
value 0 which was assigned to x.  Still, the following seems wrong to me:

torch% integer x
torch% typeset -p x
typeset -i x=0
torch% x=*.h
zsh: bad floating point constant


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

end of thread, other threads:[~2014-11-28 19:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27  5:57 Inconsistency of GLOB_ASSIGN Bart Schaefer
2014-11-27 20:43 ` Peter Stephenson
2014-11-27 20:51   ` Bart Schaefer
2014-11-27 21:38   ` Bart Schaefer
2014-11-27 23:00     ` Bart Schaefer
2014-11-28  9:34       ` Peter Stephenson
2014-11-28 18:39         ` 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).