zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: New typeset is a bit too verbose, and skips some assignments
Date: Fri, 26 Jun 2015 14:56:42 -0700	[thread overview]
Message-ID: <150626145642.ZM21883@torch.brasslantern.com> (raw)
In-Reply-To: <20150625174049.4de5fada@pwslap01u.europe.root.pri>

On Jun 25,  5:40pm, Peter Stephenson wrote:
} Subject: Re: New typeset is a bit too verbose, and skips some assignments
}
} On Thu, 25 Jun 2015 09:21:31 -0700
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > The value of x should not have been displayed by the second typeset
} 
} That's related to my previous fix --- x=() causes x to be marked as an
} array but with no value, not just an empty list.

Thanks for the patch, but it still doesn't address my second point:

> the initial empty assignment doesn't have any effect:
> 
> torch% typeset y   
> torch% typeset y=() y[2]=a y[4]=b
> torch% typeset y=() y[1]=x y[3]=z
> y=('' a '' b)
> torch% typeset -p y
> y=(x a z b)
> torch% 
> 
> I expected y=(x '' z '').

This works for scalars, i.e.

torch% typeset x=abcd x[1]=1 x[3]=3
torch% typeset -p x
typeset x=1b3d
torch% typeset x='' x[2]=2 x[4]=4
torch% typeset -p x              
typeset x=24
torch% 

Note that I did NOT get x=1234 out of that last.


  reply	other threads:[~2015-06-26 21:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 16:21 Bart Schaefer
2015-06-25 16:40 ` Peter Stephenson
2015-06-26 21:56   ` Bart Schaefer [this message]
2015-06-27 16:23     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150626145642.ZM21883@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).