zsh-users
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-users@zsh.org
Subject: Re: Trailing whitespace after $'\0' with external commands
Date: Sat, 11 Jan 2014 18:55:10 -0500	[thread overview]
Message-ID: <52D1D9DE.1000201@gmx.com> (raw)
In-Reply-To: <140111153552.ZM14759@torch.brasslantern.com>

On 01/11/2014 06:35 PM, Bart Schaefer wrote:
> I can only conclude that ksh is not actually retaining the nul byte in
> the argument list when calling /usr/bin/printf.  There's an argument
> (no pun intended) to be made for this behavior, in that it's impossible
> for a string passed through the argv mechanism of execve and friends to
> contain an embedded nul; the string will always end at that byte, so
> ksh assumes it knows better than you and removes it so that the called
> program (/usr/bin/printf in this case) can see the "whole" string.
>
> Conversely, zsh is just doing *exactly* what you told it to do.
Ah, thank you for explaining it.


      reply	other threads:[~2014-01-11 23:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11 22:18 Eric Cook
2014-01-11 22:33 ` Eric Cook
2014-01-11 23:35 ` Bart Schaefer
2014-01-11 23:55   ` Eric Cook [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=52D1D9DE.1000201@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-users@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).