zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: print -v with an array
Date: Wed, 21 Sep 2016 14:24:20 -0700	[thread overview]
Message-ID: <160921142420.ZM3676@torch.brasslantern.com> (raw)
In-Reply-To: <76611.1474487469@hydra.kiddle.eu>

On Sep 21,  9:51pm, Oliver Kiddle wrote:
} Subject: Re: PATCH: print -v with an array
}
} Bart wrote:
} > useful to have every reuse of the format add a separate entry to
} > the buffer stack.  Similarly for "print -s -f" and the history.
} 
} I doubt that anyone would notice a change of behaviour. Is multiple
} entries definitely more useful?

I don't know of a specific use-case.  It just seemed to make sense
that if you deliberately designed the format to consume only part
of the input on each pass, you might be expecting it to make separate
entries for each chunk so consumed.

Multiple buffer-stack entries might be less useful than multiple history
entries just because the buffer stack is LIFO.

} > (Currently -S is silently ignored if -f is given.  Hmm.  Not sure
} > how that ought to work anyway.)
} 
} -S is also missing from the completion function so I've missed that.
} The only way it could work is for the parsing and splitting to be done
} last. It doesn't even take more than one argument at the moment.

Yes, I'm wondering if print -S -f ... should just be an error.

} > It's probably a mistake/oversight with -c.  The *embedded* newlines
} > always get included.  The question is whether
} >
} >     print -l one two three four
} > and
} >     print -l -v stuff one two three four
} >     print "$stuff"
} >
} > should produce identical output, rather than the latter having two
} > consecutive newlines at the end.  Whichever way we decide, the same
} > really should also apply to -c.
} 
} I'd vote for the two consecutive newlines in the case of both -l and -c.

Feel free to fix this when you make whatever other tweaks emerge from
the foregoing conversation.


  reply	other threads:[~2016-09-21 21:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 16:50 Oliver Kiddle
2016-09-19 20:30 ` Bart Schaefer
2016-09-21 19:51   ` Oliver Kiddle
2016-09-21 21:24     ` Bart Schaefer [this message]
2016-11-04 16:37       ` Oliver Kiddle
2016-11-05  4:03         ` Bart Schaefer

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=160921142420.ZM3676@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).