diff options
| author | Jim Porter | 2023-03-20 17:25:24 -0700 |
|---|---|---|
| committer | Jim Porter | 2023-03-28 12:02:46 -0700 |
| commit | bb088885df7a8e8a32670286a8636db8c6fadcf4 (patch) | |
| tree | 41c49343ed8d074f3dac970dfd24bcbe4e83f641 /test | |
| parent | 5b005f26a831881b0509f05d3b28dafbbe5bad41 (diff) | |
| download | emacs-bb088885df7a8e8a32670286a8636db8c6fadcf4.tar.gz emacs-bb088885df7a8e8a32670286a8636db8c6fadcf4.zip | |
Simplify parsing subcommands slightly
This mainly reduces some overly-deep indentation, but also fixes some
minor issues with the "$<subcmd>" form: it unnecessarily added " >
TEMP" (we already set this later via 'eshell-create-handles'), and it
didn't properly unescape inner double quotes.
* lisp/eshell/esh-cmd.el (eshell-parse-subcommand-argument): Simplify.
* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Simplify and
fix edge cases in "$<subcmd>".
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-temp-cmd): Adjust test to check behavior
of inner double quotes.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/eshell/esh-var-tests.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lisp/eshell/esh-var-tests.el b/test/lisp/eshell/esh-var-tests.el index 6767d9289f9..771bd5a419c 100644 --- a/test/lisp/eshell/esh-var-tests.el +++ b/test/lisp/eshell/esh-var-tests.el | |||
| @@ -454,7 +454,7 @@ nil, use FUNCTION instead." | |||
| 454 | (let ((temporary-file-directory | 454 | (let ((temporary-file-directory |
| 455 | (file-name-as-directory (make-temp-file "esh-vars-tests" t)))) | 455 | (file-name-as-directory (make-temp-file "esh-vars-tests" t)))) |
| 456 | (unwind-protect | 456 | (unwind-protect |
| 457 | (eshell-command-result-equal "cat \"$<echo hi>\"" "hi") | 457 | (eshell-command-result-equal "cat \"$<echo \\\"hi\\\">\"" "hi") |
| 458 | (delete-directory temporary-file-directory t)))) | 458 | (delete-directory temporary-file-directory t)))) |
| 459 | 459 | ||
| 460 | (ert-deftest esh-var-test/quoted-interp-concat-cmd () | 460 | (ert-deftest esh-var-test/quoted-interp-concat-cmd () |