GNU bug report logs - #16012
24.3.50; Multi-line shell commands appear as one-liners in the history

Previous Next

Package: emacs;

Reported by: "Sebastien Vauban" <sva-news <at> mygooglest.com>

Date: Sat, 30 Nov 2013 09:52:02 UTC

Severity: minor

Tags: confirmed

Found in version 24.3.50

To reply to this bug, email your comments to 16012 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16012; Package emacs. (Sat, 30 Nov 2013 09:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Sebastien Vauban" <sva-news <at> mygooglest.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 30 Nov 2013 09:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Sebastien Vauban" <sva-news <at> mygooglest.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Multi-line shell commands appear as one-liners in the history
Date: Sat, 30 Nov 2013 10:50:39 +0100
Hello,

When typing multi-line commands (on purpose, or because of a missing
component), they end up as standalone lines in the shell command history:

> ls \
> *.html

Recalling the previous command will just show "*.html", not "ls \\n*.html".

Is there a solution to this?

Best regards,
Sebastien Vauban




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16012; Package emacs. (Sun, 01 Dec 2013 21:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 16012 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Sebastien Vauban" <sva-news <at> mygooglest.com>
Cc: 16012 <at> debbugs.gnu.org
Subject: Re: bug#16012: 24.3.50;
 Multi-line shell commands appear as one-liners in the history
Date: Sun, 01 Dec 2013 16:13:39 -0500
>> ls \
>> *.html
> Recalling the previous command will just show "*.html", not "ls \\n*.html".

Right, currently shell-mode has no idea that these were two lines of the
same command.  The semantics of a terminating backslash completely
eludes it.

> Is there a solution to this?

A patch for shell.el would probably do it, assuming it's the right patch ;-)


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16012; Package emacs. (Mon, 25 Aug 2014 18:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 16012 <at> debbugs.gnu.org (full text, mbox):

From: Sebastien Vauban <sva-news <at> mygooglest.com>
To: 16012 <at> debbugs.gnu.org
Subject: Re: Multi-line shell commands appear as one-liners in the history
Date: Mon, 25 Aug 2014 20:45:52 +0200
Hello,

>> ls \
>> *.html
>>
>> Recalling the previous command will just show "*.html", not "ls
>>\\n*.html".
>
> Right, currently shell-mode has no idea that these were two lines of
> the same command.  The semantics of a terminating backslash completely
> eludes it.
>
>> Is there a solution to this?
>
> A patch for shell.el would probably do it, assuming it's the right
> patch ;-)

I've just read notes about "Comint Patch":

  ╭────
  │ If you enter a multi-line SQL statement in an SQLi buffer, you can
  │ retrieve it as a multi-line command from the MinibufferHistory. Not so
  │ when you exit Emacs and restart it at a later date: As you exit SQLi
  │ mode the command history is written to a file; when you enter SQLi mode
  │ again the history is loaded one command per line. If you entered
  │ multi-line commands, each line of those commands will end up as one
  │ command in the input history of your new session.
  │ 
  │ This patch will be in Emacs 21.
  ╰────

See http://www.emacswiki.org/emacs-es/ComintPatched

Aren't we talking of this bug?  If yes, why isn't it yet in Emacs, then?

Best regards,
  Seb

-- 
Sebastien Vauban




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16012; Package emacs. (Thu, 15 Jul 2021 05:23:01 GMT) Full text and rfc822 format available.

Message #14 received at 16012 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sebastien Vauban <sva-news <at> mygooglest.com>
Cc: 16012 <at> debbugs.gnu.org
Subject: Re: bug#16012: 24.3.50; Multi-line shell commands appear as
 one-liners in the history
Date: Thu, 15 Jul 2021 07:22:48 +0200
Sebastien Vauban <sva-news <at> mygooglest.com> writes:

>>> ls \
>>> *.html
>>>
>>> Recalling the previous command will just show "*.html", not "ls
>>>\\n*.html".

I can confirm that this behaviour is still present in Emacs 28.

> I've just read notes about "Comint Patch":
>
>   ╭────
>   │ If you enter a multi-line SQL statement in an SQLi buffer, you can
>   │ retrieve it as a multi-line command from the MinibufferHistory. Not so
>   │ when you exit Emacs and restart it at a later date: As you exit SQLi
>   │ mode the command history is written to a file; when you enter SQLi mode
>   │ again the history is loaded one command per line. If you entered
>   │ multi-line commands, each line of those commands will end up as one
>   │ command in the input history of your new session.
>   │ 
>   │ This patch will be in Emacs 21.
>   ╰────
>
> See http://www.emacswiki.org/emacs-es/ComintPatched
>
> Aren't we talking of this bug?  If yes, why isn't it yet in Emacs, then?

Presumably nobody submitted it -- and that URL doesn't exist any more.
Does anybody have the patch in question?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 15 Jul 2021 05:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.