In emacs dired mode, is there a setting that dired uses eshell-ls and other eshell commands?

89 Views Asked by At

This answer https://emacs.stackexchange.com/questions/28981/finding-files-by-names mentions

"If you are running Dired with a 'ls' implemented in elisp, 'ls-lisp' or 'eshell-ls', then you can recursively list all the files matching a wildcard".

But I do not know how to achieve that.

Is there a way (customization or setting in init.el) to ask dired to use eshell commands where available?

2

There are 2 best solutions below

1
Drew On BEST ANSWER

You can use ls-lisp emulation (ls-lisp.el), which is part of vanilla Emacs. (Someone else will hopefully answer for eshell.)

To enable ls-lisp, customize option ls-lisp-use-insert-directory-program to the value nil.

See the Emacs manual, node ls in Lisp.

See also Emacs Wiki page ls Lisp.

0
mzimmermann On

Drew's answer showed me the path. Looking through eshell variables, it looks like to enable eshell-ls in lisp, we can use eshell-ls-use-in-dired to 't:

(setq eshell-ls-use-in-dired 't)