zsh-users
 help / color / mirror / code / Atom feed
* is this a feature of zsh-3.1.6?
@ 1999-12-27  5:48 User ALEX
  1999-12-27  7:02 ` Geoff Wing
  0 siblings, 1 reply; 7+ messages in thread
From: User ALEX @ 1999-12-27  5:48 UTC (permalink / raw)
  To: zsh-users

Hi.

	The following does not produce output to screen on FreeBSD-3.4:

#include <stdio.h>

int main (void)
{
   printf ("Hello World\n");

   return 0;
}

c74763-a% ./hello
c74763-a% ./hello | strings
Hello World


	When '\n' is added to printf:

#include <stdio.h>

int main (void)
{
   printf ("Hello World\n");

   return 0;
}
c74763-a% ./hello
Hello World


However, when running under /bin/sh, all works.

Please suggest something :-)



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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27  5:48 is this a feature of zsh-3.1.6? User ALEX
@ 1999-12-27  7:02 ` Geoff Wing
  1999-12-27  8:09   ` User ALEX
  0 siblings, 1 reply; 7+ messages in thread
From: Geoff Wing @ 1999-12-27  7:02 UTC (permalink / raw)
  To: zsh-users

User ALEX <alex@c74763-a.aurora1.co.home.com> typed:
:Hi.
:	The following does not produce output to screen on FreeBSD-3.4:
:#include <stdio.h>
:int main (void)
:{
:   printf ("Hello World\n");
                        ^^ shouldn't be here in this example
:   return 0;
:}
:
:c74763-a% ./hello
:c74763-a% ./hello | strings
:Hello World

% setopt nopromptcr	# (or unsetopt promptcr)
% ./hello
Hello World% ./hello
Hello World% sh
$ ./hello
Hello World$ ./hello
Hello World$

Regards,
-- 
Geoff Wing : <gcw@pobox.com>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@zsh.org>       Phone   : (Australia) 0413 431 874


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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27  7:02 ` Geoff Wing
@ 1999-12-27  8:09   ` User ALEX
  1999-12-27 12:09     ` Geoff Wing
  0 siblings, 1 reply; 7+ messages in thread
From: User ALEX @ 1999-12-27  8:09 UTC (permalink / raw)
  To: Geoff Wing; +Cc: zsh-users

On 27 Dec 1999, Geoff Wing wrote:

: User ALEX <alex@c74763-a.aurora1.co.home.com> typed:
: :Hi.
: :	The following does not produce output to screen on FreeBSD-3.4:
: :#include <stdio.h>
: :int main (void)
: :{
: :   printf ("Hello World\n");
:                         ^^ shouldn't be here in this example
: :   return 0;
: :}
: :
: :c74763-a% ./hello
: :c74763-a% ./hello | strings
: :Hello World
: 
: % setopt nopromptcr	# (or unsetopt promptcr)

Thanks for the answer. Do you know why this option is enabled by default?!


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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27  8:09   ` User ALEX
@ 1999-12-27 12:09     ` Geoff Wing
  1999-12-27 13:09       ` David Kågedal
  0 siblings, 1 reply; 7+ messages in thread
From: Geoff Wing @ 1999-12-27 12:09 UTC (permalink / raw)
  To: User ALEX; +Cc: zsh-users

User ALEX wrote about Re: is this a feature of zsh-3.1.6?:
:On 27 Dec 1999, Geoff Wing wrote:
:: % setopt nopromptcr	# (or unsetopt promptcr)
:Thanks for the answer. Do you know why this option is enabled by default?!

A couple of reasons are:
1) It's always been enabled by default (in the first widespread release
   version 2.0 it was called no_prompt_clobber and changed to no_prompt_cr
   in 2.2) so it's still enabled for backward compatibility.
2) It means that when line editing in command mode, the shell can reliably
   move the cursor (and text) around the line.  Without knowing where the
   cursor is in absolute (horizontal) terms the shell can't know if it has
   crossed a line boundary;  how the cursor behaves on crossing line
   boundaries has widely different behaviours depending upon the terminal.
   In short, if you use this then you're pretty much stuck with using
   short single line command lines (and no right prompt) when any text is
   spewed up prior to the prompt.

Regards,
-- 
Geoff Wing : <gcw@pobox.com>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@zsh.org>       Phone   : (Australia) 0413 431 874


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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27 12:09     ` Geoff Wing
@ 1999-12-27 13:09       ` David Kågedal
  1999-12-29 10:34         ` Nemeth Ervin
  1999-12-29 10:35         ` Nemeth Ervin
  0 siblings, 2 replies; 7+ messages in thread
From: David Kågedal @ 1999-12-27 13:09 UTC (permalink / raw)
  To: zsh-users

Geoff Wing <gcw@pobox.com> writes:

> User ALEX wrote about Re: is this a feature of zsh-3.1.6?:
> :On 27 Dec 1999, Geoff Wing wrote:
> :: % setopt nopromptcr	# (or unsetopt promptcr)
> :Thanks for the answer. Do you know why this option is enabled by default?!
> 
> A couple of reasons are:
> 1) It's always been enabled by default (in the first widespread release
>    version 2.0 it was called no_prompt_clobber and changed to no_prompt_cr
>    in 2.2) so it's still enabled for backward compatibility.
> 2) It means that when line editing in command mode, the shell can reliably
>    move the cursor (and text) around the line.  Without knowing where the
>    cursor is in absolute (horizontal) terms the shell can't know if it has
>    crossed a line boundary;  how the cursor behaves on crossing line
>    boundaries has widely different behaviours depending upon the terminal.
>    In short, if you use this then you're pretty much stuck with using
>    short single line command lines (and no right prompt) when any text is
>    spewed up prior to the prompt.

I use no_prompt_cr, and I have a right prompt and stuff.  Of course
the command line gets a little messes up when programs don't finish
their output with a newline, but that can easily be cleared up with
ctrl-L.  I prefer to clear the mess up myselft rather than having zsh
hide output.

-- 
David Kågedal


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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27 13:09       ` David Kågedal
@ 1999-12-29 10:34         ` Nemeth Ervin
  1999-12-29 10:35         ` Nemeth Ervin
  1 sibling, 0 replies; 7+ messages in thread
From: Nemeth Ervin @ 1999-12-29 10:34 UTC (permalink / raw)
  To: David Kågedal; +Cc: zsh-users

>>>>> David Kågedal writes:

[...]

> I use no_prompt_cr, and I have a right prompt and stuff.  Of course
> the command line gets a little messes up when programs don't finish
> their output with a newline, but that can easily be cleared up with
> ctrl-L.  I prefer to clear the mess up myselft rather than having zsh
> hide output.

I have the same config, but I don't enjoy cleaning up the mess.

Let's take a look, what is the behaviour in an xterm window:
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                % 258
-------------------------------------------------------------------------------




Now I turn "Auto Wraparound" off in xterm:
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                7
-------------------------------------------------------------------------------
                    ^ the cursor is here




Now with "Auto Wraparound" and "Reverse Wraparound"
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                % 257
-------------------------------------------------------------------------------
                         ^ the cursor is here

Is there a way to correct this problem?  (Assuming a perfect terminfo/termcap
database)  Irrespectively of the terminal.

-- 
  ____                 ____________________________________________________
 /____| NEMETH, ERVIN |____________________________________________________|
//	< airwin @ inf.bme.hu >		http://www.inf.bme.hu/~airwin
||
||	"Nonsense.  All you have to do is say 'Engage'"
||					-- Patrick Stewart about warp theory


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

* Re: is this a feature of zsh-3.1.6?
  1999-12-27 13:09       ` David Kågedal
  1999-12-29 10:34         ` Nemeth Ervin
@ 1999-12-29 10:35         ` Nemeth Ervin
  1 sibling, 0 replies; 7+ messages in thread
From: Nemeth Ervin @ 1999-12-29 10:35 UTC (permalink / raw)
  To: zsh-users

>>>>> David Kågedal writes:

[...]

> I use no_prompt_cr, and I have a right prompt and stuff.  Of course
> the command line gets a little messes up when programs don't finish
> their output with a newline, but that can easily be cleared up with
> ctrl-L.  I prefer to clear the mess up myselft rather than having zsh
> hide output.

I have the same config, but I don't enjoy cleaning up the mess.

Let's take a look, what is the behaviour in an xterm window:
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                % 258
-------------------------------------------------------------------------------




Now I turn "Auto Wraparound" off in xterm:
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                7
-------------------------------------------------------------------------------
                    ^ the cursor is here




Now with "Auto Wraparound" and "Reverse Wraparound"
-------------------------------------------------------------------------------
airwin@kempelen:~ % echo -n Hello World\!                                 % 257
Hello World!airwin@kempelen:~ %                                                % 257
-------------------------------------------------------------------------------
                         ^ the cursor is here

Is there a way to correct this problem?  (Assuming a perfect terminfo/termcap
database)  Irrespectively of the terminal.

-- 
  ____                 ____________________________________________________
 /____| NEMETH, ERVIN |____________________________________________________|
//	< airwin @ inf.bme.hu >		http://www.inf.bme.hu/~airwin
||
||	"Nonsense.  All you have to do is say 'Engage'"
||					-- Patrick Stewart about warp theory


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

end of thread, other threads:[~1999-12-29 10:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-27  5:48 is this a feature of zsh-3.1.6? User ALEX
1999-12-27  7:02 ` Geoff Wing
1999-12-27  8:09   ` User ALEX
1999-12-27 12:09     ` Geoff Wing
1999-12-27 13:09       ` David Kågedal
1999-12-29 10:34         ` Nemeth Ervin
1999-12-29 10:35         ` Nemeth Ervin

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