diff options
| author | Jim Porter | 2022-03-27 12:09:58 -0700 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-03 14:16:44 +0200 |
| commit | c12a48c3350bb5aa2cbefda10c5364c778463366 (patch) | |
| tree | 23f553a42ecb9c2efb840235bbb9cd998c109cd1 /test | |
| parent | 9f521db6fec6c6dbdfeb1145f4dbb603c0240299 (diff) | |
| download | emacs-c12a48c3350bb5aa2cbefda10c5364c778463366.tar.gz 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" | |||
| 148 | "Test that the backslash is not preserved for escaped special | 148 | "Test that the backslash is not preserved for escaped special |
| 149 | chars" | 149 | chars" |
| 150 | (with-temp-eshell | 150 | (with-temp-eshell |
| 151 | (eshell-command-result-p "echo \"h\\\\i\"" | 151 | (eshell-command-result-p "echo \"\\\"hi\\\\\"" |
| 152 | ;; Backslashes are doubled for regexp. | 152 | ;; Backslashes are doubled for regexp. |
| 153 | "h\\\\i\n"))) | 153 | "\\\"hi\\\\\n"))) |
| 154 | 154 | ||
| 155 | (ert-deftest eshell-test/command-running-p () | 155 | (ert-deftest eshell-test/command-running-p () |
| 156 | "Modeline should show no command running" | 156 | "Modeline should show no command running" |