From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.bugs Subject: bug#27407: 25.2; SGR reset is ignored if it terminates Eshell's output Date: Sun, 18 Jun 2017 19:07:42 +0100 Message-ID: <20170618180742.GC2617@gmail.com> References: <20170617113103.GB7315@gmail.com> <87a856schh.fsf@users.sourceforge.net> <20170618064917.GB3761@gmail.com> <87poe1qj6r.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1497809291 25658 195.159.176.226 (18 Jun 2017 18:08:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 18:08:11 +0000 (UTC) User-Agent: Mutt/1.8.3 (2017-05-23) Cc: 27407@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 18 20:08:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMecI-0006QI-VN for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 20:08:07 +0200 Original-Received: from localhost ([::1]:39165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMecO-0001uE-Aa for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 14:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMecI-0001u8-Ex for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 14:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMecE-0001Mt-FI for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 14:08:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52666) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMecE-0001MH-AH for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 14:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMecD-0002ne-Ux for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 14:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2017 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27407 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27407-submit@debbugs.gnu.org id=B27407.149780927310743 (code B ref 27407); Sun, 18 Jun 2017 18:08:01 +0000 Original-Received: (at 27407) by debbugs.gnu.org; 18 Jun 2017 18:07:53 +0000 Original-Received: from localhost ([127.0.0.1]:55343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMec5-0002nD-2x for submit@debbugs.gnu.org; Sun, 18 Jun 2017 14:07:53 -0400 Original-Received: from mail-wr0-f196.google.com ([209.85.128.196]:36749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMec2-0002my-CO for 27407@debbugs.gnu.org; Sun, 18 Jun 2017 14:07:51 -0400 Original-Received: by mail-wr0-f196.google.com with SMTP id 77so11053917wrb.3 for <27407@debbugs.gnu.org>; Sun, 18 Jun 2017 11:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OhJuPLxb7C9NKLIethhIRURsZVtRRmphQTenGu+agU0=; b=Lez0EyB5f9LvZ/Q6qiDSSe+c952uKhGPbQ7j9o9MZLg6Y5Tw9Ejlew0bG+7fWVbUiK hwfMMcF4sk18+TVfI2D+O9GNyN+EumMbuUbHV5SNM3zK8IZI2Kd9MTAQA1p0XsYTyH21 RN1DjnWKlefsfA1kI+DXvI4sGffcvKzXsjX7OqveF38j+iy/LSwZ8osCnVQM/ih9qmJA aYQ0tQ7wkrUimJnqFjtbjYmI2TBq0cKOFJqfUYwOC8jGrIL5cgTZ6vRXpKmV6t0/Zni1 7cGE1KGWxHvd+P/0J9te4IS2q7QQsBQMyLW6pu6/dLEhgR4kcq3vrXkuK2/AJc1pMeMb UpiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OhJuPLxb7C9NKLIethhIRURsZVtRRmphQTenGu+agU0=; b=n2JGeV4tZjYKLMW03QIp/y5G9GdZKvF971fzzf8UUZstggLcFyOq0AMdMw5lLWcrdy PD00mxYvG7KsySfh5kRDm1mj20vIC0uDkQQatCiyvWL09YLerp03iP9b2aubEUdzD3fv wKyZyF8F4GYqF4gXbZT1PMsVOx4Pz7yWHHICUyAWxNPr1aw2mHtvabSCaZYF7jCEbjmN vT7wyziOWYxjXUl/wBwf27ISjVIX/mui2bhGKaOtYkB0O4MhLMCY/kRQtRJSBzU8OBk3 UO2v7GWWEh/UYRE0spDA7GZTIH07Jz2y+pZle6+AFdWhtNXmkBGdEZOn8KvVK7TvUai/ jp2g== X-Gm-Message-State: AKS2vOz3m1HF0bE+CCm7CqtHzpBgKFZrrKYcLLo0h0NH+ADlUt5myKwT KxmV0gFap1r7/g== X-Received: by 10.223.165.1 with SMTP id i1mr14778558wrb.59.1497809264713; Sun, 18 Jun 2017 11:07:44 -0700 (PDT) Original-Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id t8sm7277546wrc.28.2017.06.18.11.07.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 11:07:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87poe1qj6r.fsf@users.sourceforge.net> X-Info: Simplicity is the ultimate sophistication. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133732 Archived-At: > My patch does not solve this scenario, but on the other hand, when I try > this experiment in a terminal with bash, not putting a reset does give a > coloured prompt, i.e., in the following the 2nd "~/src$" is in yellow: > > ~/src$ echo $'\e[33mhello' > hello > ~/src$ > > So should eshell really be any different? Yes. Definitely. Eshell _already_ is very different and that's why we use it. Bash is hardly a role model in the world of shells. In the case of bash, the issue probably stems back from historical limitations of VT* terminals. Something that does not make sense to emulate in modern computers. I don't see any use case for letting the SGR color the shell. If you want to change you shell from a command, Elisp is your friend... -- Pierre Neidhardt