diff options
| author | Tino Calancha | 2017-08-01 23:31:35 +0900 |
|---|---|---|
| committer | Tino Calancha | 2017-08-01 23:31:43 +0900 |
| commit | f3ad15933a0d104b099d640d5c43fce99ece0003 (patch) | |
| tree | 17ef5f20e9b5457f8cecf081d10d10c0b2f3747c /lisp/eshell | |
| parent | 4ddc5645606478725ae0c27c85aa3c5dca6360d6 (diff) | |
| download | emacs-f3ad15933a0d104b099d640d5c43fce99ece0003.tar.gz emacs-f3ad15933a0d104b099d640d5c43fce99ece0003.zip | |
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." | |||
| 278 | (let ((insert-func 'insert) | 278 | (let ((insert-func 'insert) |
| 279 | (error-func 'insert) | 279 | (error-func 'insert) |
| 280 | (flush-func 'ignore) | 280 | (flush-func 'ignore) |
| 281 | eshell-ls-dired-initial-args) | 281 | (switches |
| 282 | (eshell-do-ls (append switches (list file))))))))) | 282 | (append eshell-ls-dired-initial-args |
| 283 | (and (or (consp dired-directory) wildcard) (list "-d")) | ||
| 284 | switches))) | ||
| 285 | (eshell-do-ls (nconc switches (list file))))))))) | ||
| 286 | |||
| 283 | 287 | ||
| 284 | (declare-function eshell-extended-glob "em-glob" (glob)) | 288 | (declare-function eshell-extended-glob "em-glob" (glob)) |
| 285 | (declare-function dired-read-dir-and-switches "dired" (str)) | 289 | (declare-function dired-read-dir-and-switches "dired" (str)) |