mzimmermann
mzimmermann

Reputation: 1072

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

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?

Upvotes: 1

Views: 111

Answers (2)

mzimmermann
mzimmermann

Reputation: 1072

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)

Upvotes: 1

Drew
Drew

Reputation: 30701

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.

Upvotes: 1

Related Questions