* No newline, no print.
@ 2003-12-12 20:44 N. Thomas
2003-12-12 20:52 ` Jean Chalard
0 siblings, 1 reply; 4+ messages in thread
From: N. Thomas @ 2003-12-12 20:44 UTC (permalink / raw)
To: zsh-users
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@cise.ufl.edu
http://www.cise.ufl.edu/~nthomas/
Etiamsi occiderit me, in ipso sperabo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No newline, no print.
2003-12-12 20:44 No newline, no print N. Thomas
@ 2003-12-12 20:52 ` Jean Chalard
2003-12-15 18:23 ` jayjwa
2003-12-19 11:49 ` zzapper
0 siblings, 2 replies; 4+ messages in thread
From: Jean Chalard @ 2003-12-12 20:52 UTC (permalink / raw)
To: N. Thomas; +Cc: zsh-users
> 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";
setopt no_prompt_cr
But you could as well have read the mailing list archive.
(This one comes up pretty often)
--
J
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No newline, no print.
2003-12-12 20:52 ` Jean Chalard
@ 2003-12-15 18:23 ` jayjwa
2003-12-19 11:49 ` zzapper
1 sibling, 0 replies; 4+ messages in thread
From: jayjwa @ 2003-12-15 18:23 UTC (permalink / raw)
To: zsh-users
On Fri, 12 Dec 2003, Jean Chalard wrote:
> Subject: Re: 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";
> setopt no_prompt_cr
Thanks. I too was puzzled by this, but I certainly didn't think it had
anything to do with Zsh. Works fine now ;)
=-=-=.:|DISTRIBUTION|PROGRAMMING|RESEARCH|PORTAL|:.-=-=
[jayjwa] RLF#37 Raq glenaal: Nffnfvangr Ovyy Tngrf
[Atr2.Ath.Cx Labs] Jvaqbjf vf n qvfrnfr
Finger for proj. "Putting encryption to good use."
silc://atr2.ath.cx:706..........Silc: http://silcnet.org
=Linux Tough.Powered By Slackware=-HTTPS|FTP|SILC|SSH-=
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No newline, no print.
2003-12-12 20:52 ` Jean Chalard
2003-12-15 18:23 ` jayjwa
@ 2003-12-19 11:49 ` zzapper
1 sibling, 0 replies; 4+ messages in thread
From: zzapper @ 2003-12-19 11:49 UTC (permalink / raw)
To: zsh-users
On Fri, 12 Dec 2003 21:52:13 +0100, Jean Chalard
<jean.chalard@epita.fr> wrote:
>> 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";
>
>setopt no_prompt_cr
>
>But you could as well have read the mailing list archive.
>(This one comes up pretty often)
I'd STRONGLY recommend that u set "setopt no_prompt_cr" this in your
.zshrc tout de suite if you're a Perl Programmer
zzapper (vim & zsh)
--
vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"
http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-19 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-12 20:44 No newline, no print N. Thomas
2003-12-12 20:52 ` Jean Chalard
2003-12-15 18:23 ` jayjwa
2003-12-19 11:49 ` zzapper
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).