From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1763 invoked from network); 28 Apr 2005 21:53:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Apr 2005 21:53:11 -0000 Received: (qmail 90795 invoked from network); 28 Apr 2005 21:53:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Apr 2005 21:53:05 -0000 Received: (qmail 12981 invoked by alias); 28 Apr 2005 21:53:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21212 Received: (qmail 12311 invoked from network); 28 Apr 2005 21:51:20 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Apr 2005 21:51:20 -0000 Received: (qmail 89713 invoked from network); 28 Apr 2005 21:51:20 -0000 Received: from smtp-out-2002.amazon.com (207.171.160.38) by a.mx.sunsite.dk with SMTP; 28 Apr 2005 21:51:16 -0000 X-Amazon-Corporate-Relay: smtp-out-2002.iad2.amazon.com X-AMAZON-TRACK: Received: from smtp-in-1001.vdc.amazon.com by smtp-out-2002.amazon.com with ESMTP (peer crosscheck: smtp-in-1001.vdc.amazon.com) Received: from ex-mail-sea-02.ant.amazon.com (ex-mail-sea-02.sea3.amazon.com [172.20.6.100]) by smtp-in-1001.vdc.amazon.com (8.12.10/8.12.10) with ESMTP id j3SLpEQI002977 for ; Thu, 28 Apr 2005 21:51:14 GMT x-mimeole: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C54C3C.65E05D94" Subject: BUG? Zsh does not print the last line of stdout of a child process if that line does not have newline char at end. BUG? Date: Thu, 28 Apr 2005 14:51:13 -0700 Message-ID: <897DED128797EC46906FF8EDDBFB5DD03F8D38@ex-mail-sea-02.ant.amazon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: BUG? Zsh does not print the last line of stdout of a child process if that line does not have newline char at end. BUG? Thread-Index: AcVMPGWdO3EzO4V5TreXQo+UPpJe4Q== From: "Batalov, Denis" To: X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-17.6 required=6.0 tests=BAYES_00,HTML_40_50, HTML_MESSAGE,USER_IN_DEF_WHITELIST autolearn=ham version=3.0.2 X-Spam-Hits: -17.6 This is a multi-part message in MIME format. ------_=_NextPart_001_01C54C3C.65E05D94 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have encountered unexpected zsh behaviour which looks like a bug. At = the same time it is so basic that others must have seen it before, so = maybe it's not. I would appreciate some clarification. Basically, if the last line in the output of a command executed from the = zsh command-line does not have the terminating newline character, then = the line is not shown by zsh. Here is a simple test one can try: $ echo -n gogi $ On other shells, e.g. bash, the behaviour is as expected: $ echo -n gogi gogi$ Any comments? Please CC directly to my e-mail address, as I am not a = regular reader. Thanks, -- Denis V. Batalov ------_=_NextPart_001_01C54C3C.65E05D94 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BUG? Zsh does not print the last line of stdout of a child = process if that line does not have newline char at end. BUG?

I have encountered unexpected zsh = behaviour which looks like a bug. At the same time it is so basic that = others must have seen it before, so maybe it's not. I would appreciate = some clarification.

Basically, if the last line in the = output of a command executed from the zsh command-line does not have the = terminating newline character, then the line is not shown by zsh. Here = is a simple test one can try:

$ echo -n gogi
$

On other shells, e.g. bash, the = behaviour is as expected:

$ echo -n gogi
gogi$

Any comments? Please CC directly to my = e-mail address, as I am not a regular reader.

Thanks,
--
Denis V. Batalov

------_=_NextPart_001_01C54C3C.65E05D94-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12792 invoked from network); 29 Apr 2005 01:18:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Apr 2005 01:18:29 -0000 Received: (qmail 60902 invoked from network); 29 Apr 2005 01:18:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Apr 2005 01:18:23 -0000 Received: (qmail 2535 invoked by alias); 29 Apr 2005 01:18:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21213 Received: (qmail 2513 invoked from network); 29 Apr 2005 01:18:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Apr 2005 01:18:16 -0000 Received: (qmail 60496 invoked from network); 29 Apr 2005 01:18:16 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 29 Apr 2005 01:18:11 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id E6D432854; Thu, 28 Apr 2005 18:18:09 -0700 (PDT) Date: Thu, 28 Apr 2005 18:18:09 -0700 From: Wayne Davison To: "Batalov, Denis" Cc: zsh-workers@sunsite.dk Subject: Re: BUG? Zsh does not print the last line of stdout of a child process if that line does not have newline char at end. BUG? Message-ID: <20050429011809.GE16419@blorf.net> References: <897DED128797EC46906FF8EDDBFB5DD03F8D38@ex-mail-sea-02.ant.amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <897DED128797EC46906FF8EDDBFB5DD03F8D38@ex-mail-sea-02.ant.amazon.com> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Thu, Apr 28, 2005 at 02:51:13PM -0700, Batalov, Denis wrote: > $ echo -n gogi > $ I like the precmd solution mentioned in the FAQ: http://zsh.sunsite.dk/FAQ/zshfaq03.html#l40 (Note to FAQ maintainer: the index appears to be off by one -- it linked to l39, but the answer appears to be l40.) ..wayne.. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17088 invoked from network); 29 Apr 2005 01:46:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Apr 2005 01:46:02 -0000 Received: (qmail 75501 invoked from network); 29 Apr 2005 01:45:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Apr 2005 01:45:56 -0000 Received: (qmail 17240 invoked by alias); 29 Apr 2005 01:45:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21214 Received: (qmail 17221 invoked from network); 29 Apr 2005 01:45:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Apr 2005 01:45:52 -0000 Received: (qmail 75160 invoked from network); 29 Apr 2005 01:45:51 -0000 Received: from master.altlinux.ru (62.118.250.235) by a.mx.sunsite.dk with SMTP; 29 Apr 2005 01:45:47 -0000 Received: from solemn.turbinal.org (localhost.localdomain [127.0.0.1]) by master.altlinux.ru (Postfix) with ESMTP id 81290E31DA for ; Fri, 29 Apr 2005 05:45:45 +0400 (MSD) Received: by solemn.turbinal.org (Postfix, from userid 500) id 00D39A668F; Fri, 29 Apr 2005 05:45:38 +0400 (MSD) Date: Fri, 29 Apr 2005 05:45:38 +0400 From: Alexey Tourbin To: zsh-workers@sunsite.dk Subject: Re: BUG? Zsh does not print the last line of stdout of a child process if that line does not have newline char at end. BUG? Message-ID: <20050429014538.GD31486@solemn.turbinal.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <897DED128797EC46906FF8EDDBFB5DD03F8D38@ex-mail-sea-02.ant.amazon.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IMjqdzrDRly81ofr" Content-Disposition: inline In-Reply-To: <897DED128797EC46906FF8EDDBFB5DD03F8D38@ex-mail-sea-02.ant.amazon.com> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 --IMjqdzrDRly81ofr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 28, 2005 at 02:51:13PM -0700, Batalov, Denis wrote: > $ echo -n gogi > $ >=20 > On other shells, e.g. bash, the behaviour is as expected: >=20 > $ echo -n gogi > gogi$ >=20 > Any comments? Please CC directly to my e-mail address, as I am not a regu= lar reader. setopt NO_PROMPTCR > Thanks, > -- > Denis V. Batalov --IMjqdzrDRly81ofr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCcZHCfBKgtDjnu0YRAlJ+AJ4hgE9C7trg+15tYDWmLHjF7T+CigCgjSIf T1BDsBxf56HSlKxL2axq6N8= =LrzY -----END PGP SIGNATURE----- --IMjqdzrDRly81ofr--