zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Bart Schaefer <schaefer@brasslantern.com>,
	 Roman Perepelitsa <roman.perepelitsa@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>,
	 Beverly Pope <countryone77@gmail.com>
Subject: Re: print -C and terminators
Date: Sun, 31 Jan 2021 13:12:19 -0800	[thread overview]
Message-ID: <CAH+w=7buMMt6v6h0U_ueJ_ZahOfMkMhqWrNC-86+uS0MYnP_eQ@mail.gmail.com> (raw)
In-Reply-To: <20210131093605.kusgjbaezp3foxbc@chazelas.org>

On Sun, Jan 31, 2021 at 1:36 AM Stephane Chazelas <stephane@chazelas.org> wrote:
>
> ~$ print -raC2 a b c | sed -n l
> a  b  $
> c  $
>
> could also be improved.

Is that just this?

diff --git a/Src/builtin.c b/Src/builtin.c
index 09eb3728c..35a0fb2db 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4822,7 +4822,7 @@ bin_print(char *name, char **args, Options ops, int func)
                {
                    fwrite(args[n], len[n], 1, fout);
                    l = widths[n];
-                   if (n < argc)
+                   if (n < argc && ic < nc - 1)
                        for (; l < sc; l++)
                            fputc(' ', fout);
                }


      reply	other threads:[~2021-01-31 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d611ab66-c6f9-655f-89dc-ded8697fe0ed@eastlink.ca>
     [not found] ` <CAN=4vMp+JykOWEYQ5qO495-hOpQXh+4RN6iHcYTP-APg8XHESQ@mail.gmail.com>
     [not found]   ` <CAH+w=7bN7miEudLZcLknDQH3im=u8CCe_3GUqtEJMtyidV8bUg@mail.gmail.com>
     [not found]     ` <CAN=4vMop86hkyYMaBkF-tJaVRaN5Z28gJLqL9tSdy-uy1DNMgg@mail.gmail.com>
     [not found]       ` <0421713D-25C5-477A-90AD-C0BD2B40EED2@gmail.com>
2021-01-30 18:51         ` Bart Schaefer
2021-01-30 19:08           ` Beverly Pope
2021-01-30 22:47           ` Roman Perepelitsa
2021-01-31  1:08             ` Bart Schaefer
2021-01-31  9:36               ` Stephane Chazelas
2021-01-31 21:12                 ` Bart Schaefer [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='CAH+w=7buMMt6v6h0U_ueJ_ZahOfMkMhqWrNC-86+uS0MYnP_eQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=countryone77@gmail.com \
    --cc=roman.perepelitsa@gmail.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).