diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-08-01 23:31:35 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-08-01 23:31:43 +0900 |
commit | f3ad15933a0d104b099d640d5c43fce99ece0003 (patch) | |
tree | 17ef5f20e9b5457f8cecf081d10d10c0b2f3747c /lisp/eshell | |
parent | 4ddc5645606478725ae0c27c85aa3c5dca6360d6 (diff) | |
download | emacs-f3ad15933a0d104b099d640d5c43fce99ece0003.tar.gz |
Insert subdir content if dir-or-list is a string w/o wildcards
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
Append '("-d") into 'eshell-ls-dired-initial-args'
if 'dired-directory' is a cons or there are wildcars (Bug#27843).
* test/lisp/dired-tests.el (dired-test-bug27843): Add test.
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/em-ls.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 4a5adc48f2b..39f03ffb79e 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -278,8 +278,12 @@ instead." (let ((insert-func 'insert) (error-func 'insert) (flush-func 'ignore) - eshell-ls-dired-initial-args) - (eshell-do-ls (append switches (list file))))))))) + (switches + (append eshell-ls-dired-initial-args + (and (or (consp dired-directory) wildcard) (list "-d")) + switches))) + (eshell-do-ls (nconc switches (list file))))))))) + (declare-function eshell-extended-glob "em-glob" (glob)) (declare-function dired-read-dir-and-switches "dired" (str)) |