Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: question mark in filename.



On 2021-01-10 7:28 a.m., Roman Perepelitsa wrote:
It does that only when stdout is a tty. The output in this mode has
been improved recently. Here's what I get:

   % ls
   's,7,big'$'\n''improvements'$'\n''in'$'\n''code'$'\n'
That's a whole lot more honest.  A linefeed is not a question mark. This can be put to bed now, but if I had one remaining question it is why (or how) I might have protected the rogue characters.  As I mentioned I tried ' ${(q)input} ' and variations because  that seems to swallow most things and I was suspicious.  Nevermind.
   % ls | cat
   s,7,big
   improvements
   in
   code
Yeah, after I captured the output to a variable, that's exactly what it wanted to show and of course now I know that's exactly what it should show.  Linefeeds are linefeeds.

That's just the output of `ls` when stdout is a tty.
Ok, so 'eval' is innocent of all this.  As usual the man page is less than helpful, they could mention all this and save us all the trouble.






Messages sorted by: Reverse Date, Date, Thread, Author