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

No newline, no print.



When I print something to stdout that doesn't have a newline at the end,
Z-Shell refuses to print it. Note the following Perl program:

    print "My name is Bob.\n";

I run like so:

    prompt$ perl nl.pl
    My name is Bob.
    prompt$

Now, using my advanced knowledge of Perl, I change the program to this:

    print "My name is Mud.";

(note the missing newline) and I run again:

    prompt$ perl nonl.pl
    prompt$

Nothing!

To be honest, I do see it -- but it is overwritten by $PS1 a
split-second later.

Not that I spend my time writing Perl programs without newlines in them
(I use Python), but oftentimes badly written programs or processes that
crash will occasionally output something without this newline and I
usually don't catch it quickly enough.

That other shell does this:

    trash-2.01$ perl nonl.pl
    My name is Mud.trash-2.01$

Note how it doesn't overwrite the output -- this is what I'd like
Z-Shell to do. How can I?

thanks,
Thomas

-- 
N. Thomas
nthomas@xxxxxxxxxxxx
http://www.cise.ufl.edu/~nthomas/
Etiamsi occiderit me, in ipso sperabo



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