]> git.eshelyaron.com Git - emacs.git/commit
In Eshell, allow an escaped newline at the end of a command
authorJim Porter <jporterbugs@gmail.com>
Sun, 28 Jan 2024 23:49:03 +0000 (15:49 -0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jan 2024 20:15:23 +0000 (21:15 +0100)
commitb70896f78f88e1a482ea394c9a4163394d2e5f0b
treefecc97389651f7e95823a3199d031f753355719f
parent9f6b14bd92c6ed38c8b08f56b8d303907595150b
In Eshell, allow an escaped newline at the end of a command

Normally, "echo<RET>" runs the command "echo".  Likewise,
"echo\<RET><RET>" should too: we escape the first newline, and then
the second one is unescaped and should send the command input to
Eshell.  Previously, you had to press RET a third time, but now it
works as expected.

* lisp/eshell/esh-arg.el (eshell-looking-at-backslash-return): Make
obsolete.
(eshell-parse-backslash): A backslash sequence is only incomplete if
there's nothing at all after it.

* test/lisp/eshell/esh-arg-tests.el (esh-arg-test/escape/newline)
(esh-arg-test/escape-quoted/newline): Remove inaccurate comment;
escaped newlines are always special.
(esh-arg-test/escape/trailing-newline): New test.

(cherry picked from commit 1f5a13d5843306af2e6a74fbdfd6d00af8804a23)
lisp/eshell/esh-arg.el
test/lisp/eshell/esh-arg-tests.el