diff options
author | Jim Porter <jporterbugs@gmail.com> | 2022-03-27 12:09:58 -0700 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-04-03 14:16:44 +0200 |
commit | c12a48c3350bb5aa2cbefda10c5364c778463366 (patch) | |
tree | 23f553a42ecb9c2efb840235bbb9cd998c109cd1 /test | |
parent | 9f521db6fec6c6dbdfeb1145f4dbb603c0240299 (diff) | |
download | emacs-c12a48c3350bb5aa2cbefda10c5364c778463366.tar.gz emacs-c12a48c3350bb5aa2cbefda10c5364c778463366.tar.bz2 emacs-c12a48c3350bb5aa2cbefda10c5364c778463366.zip |
Fix handling of '\\' inside double-quotes in Eshell
Previously, Eshell would get confused and think the following command
was unterminated due to the second double-quote looking like it was
escaped:
echo "\\"
* lisp/eshell/esh-util.el (eshell-find-delimiter): Correct docstring
and treat '\' as an escapeable character when using backslash escapes.
* test/lisp/eshell/eshell-tests.el
(eshell-test/escape-special-quoted): Adapt test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/eshell/eshell-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index 1e303f70e5f..bcc2dc320b2 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el @@ -148,9 +148,9 @@ chars" "Test that the backslash is not preserved for escaped special chars" (with-temp-eshell - (eshell-command-result-p "echo \"h\\\\i\"" + (eshell-command-result-p "echo \"\\\"hi\\\\\"" ;; Backslashes are doubled for regexp. - "h\\\\i\n"))) + "\\\"hi\\\\\n"))) (ert-deftest eshell-test/command-running-p () "Modeline should show no command running" |