zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Make typeset -p1 work in combination with -m.
Date: Fri, 20 Oct 2017 10:41:45 +0100	[thread overview]
Message-ID: <20171020104145.55f5a6cf@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <1508437451.2315004.1144515592.1A7F0262@webmail.messagingengine.com>

On Thu, 19 Oct 2017 18:24:11 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> wrote:

> Daniel Shahaf wrote on Thu, 19 Oct 2017 14:40 +0000:
> > Peter Stephenson wrote on Wed, Oct 18, 2017 at 09:31:19 +0100:
> > > On Tue, 17 Oct 2017 18:27:00 +0000
> > > Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > > > The PRINT_INCLUDEVALUE codepath will now pass
> > > > PRINT_LINE|PRINT_TYPESET|PRINT_INCLUDEVALUE; is that correct?
> > > 
> > > Yes, as long as the resulting output makes sense the flag can be passed
> > > through.
> > 
> > Ack.  I'll double check the output before pushing.
> 
> There's an unwanted output change:
> 
> before% typeset -m argv
> argv=(  )
> 
> after% typeset -m argv
> array argv

That can only be this chunk at the end of printparamnode() --- there's
nowhere else where we deal with the value.  So something you've done has
changed the result of that first test.  You'll probably just have to
step through and look at what's happening here.

pws

    if ((printflags & PRINT_NAMEONLY) ||
	((p->node.flags & PM_HIDEVAL) && !(printflags & PRINT_INCLUDEVALUE))) {
	zputs(p->node.nam, stdout);
	putchar('\n');
    } else {
	if (printflags & PRINT_KV_PAIR) {
	    if (printflags & PRINT_LINE)
		printf("\n  ");
	    putchar('[');
	}
	quotedzputs(p->node.nam, stdout);
	if (printflags & PRINT_KV_PAIR)
	    printf("]=");

	printparamvalue(p, printflags);
    }


      reply	other threads:[~2017-10-20  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171017182806epcas1p25cabca4be0c223080d6aa3b8fbd30055@epcas1p2.samsung.com>
2017-10-17 18:27 ` Daniel Shahaf
2017-10-17 18:56   ` Oliver Kiddle
2017-10-18  8:31   ` Peter Stephenson
2017-10-19 14:40     ` Daniel Shahaf
2017-10-19 18:24       ` Daniel Shahaf
2017-10-20  9:41         ` Peter Stephenson [this message]

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=20171020104145.55f5a6cf@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).