zsh-users
 help / color / mirror / code / Atom feed
* Trailing whitespace after $'\0' with external commands
@ 2014-01-11 22:18 Eric Cook
  2014-01-11 22:33 ` Eric Cook
  2014-01-11 23:35 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Cook @ 2014-01-11 22:18 UTC (permalink / raw)
  To: zsh-users

I've noticed trailing whitespace is ignored when it appears immediately
after $'\0'. i am unsure if this is intended behavior or not.

% zsh -c "/usr/bin/printf '<%s>' $'\0'' '; echo"
<>
% zsh -c "printf '<%s>' $'\0'' '; echo"
< >
% ksh93 -c "/usr/bin/printf '<%s>' $'\0'' '; echo"
< >
% ksh93 -c "printf '<%s>' $'\0'' '; echo"
<
>                                                                                                    

% ksh93 -c "type printf"
printf is a shell builtin
%

If the whitespace appears before the $'\0', it prints.
% zsh -c "/usr/bin/printf '<%s>' ' '$'\0'; echo"
< >
% zsh -c "printf '<%s>' ' '$'\0'; echo"
< >


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-11 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-11 22:18 Trailing whitespace after $'\0' with external commands Eric Cook
2014-01-11 22:33 ` Eric Cook
2014-01-11 23:35 ` Bart Schaefer
2014-01-11 23:55   ` Eric Cook

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).