diff options
| author | Jim Porter | 2023-09-02 22:29:22 -0700 |
|---|---|---|
| committer | Jim Porter | 2024-01-28 16:02:05 -0800 |
| commit | d2abe91d4bf68f20e4b1cd39f88ed98fd5731524 (patch) | |
| tree | f15335a1b5b09ac561256b97264b9a0fd99a2802 /lisp/eshell | |
| parent | 1f5a13d5843306af2e6a74fbdfd6d00af8804a23 (diff) | |
| download | emacs-d2abe91d4bf68f20e4b1cd39f88ed98fd5731524.tar.gz emacs-d2abe91d4bf68f20e4b1cd39f88ed98fd5731524.zip | |
In Eshell, don't expand quoted tildes into a user's home directory
* lisp/eshell/em-dirs.el (eshell-parse-user-reference): Don't expand
quoted tildes.
* test/lisp/eshell/em-dirs-tests.el
(em-dirs-test/expand-user-reference/local)
(em-dirs-test/expand-user-reference/quoted): New tests.
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-dirs.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 85036620c57..07063afc286 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el | |||
| @@ -262,6 +262,7 @@ Thus, this does not include the current directory.") | |||
| 262 | (defun eshell-parse-user-reference () | 262 | (defun eshell-parse-user-reference () |
| 263 | "An argument beginning with ~ is a filename to be expanded." | 263 | "An argument beginning with ~ is a filename to be expanded." |
| 264 | (when (and (not eshell-current-argument) | 264 | (when (and (not eshell-current-argument) |
| 265 | (not eshell-current-quoted) | ||
| 265 | (eq (char-after) ?~)) | 266 | (eq (char-after) ?~)) |
| 266 | ;; Apply this modifier fairly early so it happens before things | 267 | ;; Apply this modifier fairly early so it happens before things |
| 267 | ;; like glob expansion. | 268 | ;; like glob expansion. |