aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-glob.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index 842f27a4920..52531ff8939 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -233,7 +233,10 @@ resulting regular expression."
233 "\\'"))) 233 "\\'")))
234 234
235(defun eshell-extended-glob (glob) 235(defun eshell-extended-glob (glob)
236 "Return a list of files generated from GLOB, perhaps looking for DIRS-ONLY. 236 "Return a list of files matched by GLOB.
237If no files match, signal an error (if `eshell-error-if-no-glob'
238is non-nil), or otherwise return GLOB itself.
239
237This function almost fully supports zsh style filename generation 240This function almost fully supports zsh style filename generation
238syntax. Things that are not supported are: 241syntax. Things that are not supported are:
239 242
@@ -243,12 +246,7 @@ syntax. Things that are not supported are:
243 foo~x(a|b) (a|b) will be interpreted as a predicate/modifier list 246 foo~x(a|b) (a|b) will be interpreted as a predicate/modifier list
244 247
245Mainly they are not supported because file matching is done with Emacs 248Mainly they are not supported because file matching is done with Emacs
246regular expressions, and these cannot support the above constructs. 249regular expressions, and these cannot support the above constructs."
247
248If this routine fails, it returns nil. Otherwise, it returns a list
249the form:
250
251 (INCLUDE-REGEXP EXCLUDE-REGEXP (PRED-FUNC-LIST) (MOD-FUNC-LIST))"
252 (let ((paths (eshell-split-path glob)) 250 (let ((paths (eshell-split-path glob))
253 eshell-glob-matches message-shown) 251 eshell-glob-matches message-shown)
254 (unwind-protect 252 (unwind-protect
@@ -287,7 +285,7 @@ the form:
287 glob (car globs) 285 glob (car globs)
288 len (length glob))))) 286 len (length glob)))))
289 (if (and recurse-p (not glob)) 287 (if (and recurse-p (not glob))
290 (error "`**' cannot end a globbing pattern")) 288 (error "`**/' cannot end a globbing pattern"))
291 (let ((index 1)) 289 (let ((index 1))
292 (setq incl glob) 290 (setq incl glob)
293 (while (and (eq incl glob) 291 (while (and (eq incl glob)