Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: print -C and terminators
- X-seq: zsh-workers 47895
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>, Beverly Pope <countryone77@xxxxxxxxx>
- Subject: Re: print -C and terminators
- Date: Sun, 31 Jan 2021 13:12:19 -0800
- Archived-at: <https://zsh.org/workers/47895>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-01/CAH%2Bw%3D7buMMt6v6h0U_ueJ_ZahOfMkMhqWrNC-86%2BuS0MYnP_eQ%40mail.gmail.com>
- In-reply-to: <20210131093605.kusgjbaezp3foxbc@chazelas.org>
- List-id: <zsh-workers.zsh.org>
- References: <d611ab66-c6f9-655f-89dc-ded8697fe0ed@eastlink.ca> <CAN=4vMp+JykOWEYQ5qO495-hOpQXh+4RN6iHcYTP-APg8XHESQ@mail.gmail.com> <CAH+w=7bN7miEudLZcLknDQH3im=u8CCe_3GUqtEJMtyidV8bUg@mail.gmail.com> <CAN=4vMop86hkyYMaBkF-tJaVRaN5Z28gJLqL9tSdy-uy1DNMgg@mail.gmail.com> <0421713D-25C5-477A-90AD-C0BD2B40EED2@gmail.com> <CAH+w=7atW1ArhSO0QLux_XxXR4NBmytZwZ5b79j-2CSv+Tajpg@mail.gmail.com> <CAN=4vMpMJ7nj0d5moqOxmQ2i0uMbu1fwH=FCzT7XsV6hB2UUMQ@mail.gmail.com> <CAH+w=7ZPLDMUOSRTh1BkiRomrW04mr7pYnfSfeQ62bxY8_LmLg@mail.gmail.com> <20210131093605.kusgjbaezp3foxbc@chazelas.org>
On Sun, Jan 31, 2021 at 1:36 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> 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);
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author