summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2020-08-22 17:39:16 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-22 17:57:39 +0200
commit29bb72f0432c7b89d2f7dec5022c582f8e10ada9 (patch)
treede2bafd49ba6d53a8764e483c1ff16656881d35a /doc/emacs
parente63a0c466c10d0b9de6a28e2ddd412226087bd27 (diff)
downloademacs-29bb72f0432c7b89d2f7dec5022c582f8e10ada9.tar.gz
emacs-29bb72f0432c7b89d2f7dec5022c582f8e10ada9.tar.bz2
emacs-29bb72f0432c7b89d2f7dec5022c582f8e10ada9.zip
Handle globstar in dired
Allow user to enable globstar when the shell support it and disable it by default (e.g. bash). * lisp/dired.el (dired-maybe-use-globstar): New user option. (dired-enable-globstar-in-shell): New variable. (dired-insert-directory): if `dired-maybe-use-globstar' is non-nil and the shell supports globstar, then enable it. * doc/emacs/dired.texi: Document feature. ; * etc/NEWS: Add entry.
Diffstat (limited to 'doc/emacs')
-rw-r--r--doc/emacs/dired.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index de449e31c37..39caab086c2 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -79,6 +79,24 @@ The former lists all the files with extension @samp{.el} in directory
@samp{foo}. The latter lists the files with extension @samp{.el}
in all the subdirectories of @samp{foo}.
+When the system shell supports globstar and it's enabled, then you
+can use recursive globbing:
+
+@example
+C-x d ~/foo/**/*.el @key{RET}
+@end example
+
+This command lists all the files with extension @samp{.el} descending
+recursively in all the subdirectories of @samp{foo}. Note that there
+are small differences in the implementation of globstar between shells.
+Check your shell manual to know the expected behavior.
+
+@vindex dired-maybe-use-globstar
+@vindex dired-enable-globstar-in-shell
+If the shell supports globstar and disables it by default, you
+can still enable this feature with @code{dired-maybe-use-globstar} if
+the shell is included in @code{dired-enable-globstar-in-shell}.
+
The usual history and completion commands can be used in the minibuffer;
in particular, @kbd{M-n} puts the name of the visited file (if any) in
the minibuffer (@pxref{Minibuffer History}).