unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16012: 24.3.50; Multi-line shell commands appear as one-liners in the history
@ 2013-11-30  9:50 Sebastien Vauban
  2013-12-01 21:13 ` Stefan Monnier
       [not found] ` <86eh5yb4ls.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastien Vauban @ 2013-11-30  9:50 UTC (permalink / raw)
  To: 16012-ubl+/3LiMTaZdePnXv/OxA

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





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

* bug#16012: 24.3.50; Multi-line shell commands appear as one-liners in the history
  2013-11-30  9:50 bug#16012: 24.3.50; Multi-line shell commands appear as one-liners in the history Sebastien Vauban
@ 2013-12-01 21:13 ` Stefan Monnier
       [not found] ` <86eh5yb4ls.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-12-01 21:13 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 16012

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





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

* bug#16012: Multi-line shell commands appear as one-liners in the history
       [not found] ` <86eh5yb4ls.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
@ 2014-08-25 18:45   ` Sebastien Vauban
  2021-07-15  5:22     ` bug#16012: 24.3.50; " Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2014-08-25 18:45 UTC (permalink / raw)
  To: 16012-ubl+/3LiMTaZdePnXv/OxA

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





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

* bug#16012: 24.3.50; Multi-line shell commands appear as one-liners in the history
  2014-08-25 18:45   ` bug#16012: " Sebastien Vauban
@ 2021-07-15  5:22     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-15  5:22 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 16012

Sebastien Vauban <sva-news@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





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

end of thread, other threads:[~2021-07-15  5:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-30  9:50 bug#16012: 24.3.50; Multi-line shell commands appear as one-liners in the history Sebastien Vauban
2013-12-01 21:13 ` Stefan Monnier
     [not found] ` <86eh5yb4ls.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
2014-08-25 18:45   ` bug#16012: " Sebastien Vauban
2021-07-15  5:22     ` bug#16012: 24.3.50; " Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).