summaryrefslogtreecommitdiff
path: root/lisp/pcmpl-gnu.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-10-27 03:09:44 +0100
committerStefan Kangas <stefan@marxist.se>2020-10-27 03:09:44 +0100
commit25a57640c59e1630ad31b766a7a92abab856a284 (patch)
tree0145562914e02c966c3f980d699ec05590169abd /lisp/pcmpl-gnu.el
parentcfc70e51c29df37f4245fd1754124a46ffca19f7 (diff)
downloademacs-25a57640c59e1630ad31b766a7a92abab856a284.tar.gz
Allow pcomplete/gzip to complete on files in subdirectories
* lisp/pcmpl-gnu.el (pcmpl-gnu-zipped-files): Allow "gzip" to complete on files in subdirectories. (Bug#30271)
Diffstat (limited to 'lisp/pcmpl-gnu.el')
-rw-r--r--lisp/pcmpl-gnu.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index d7c5b381d29..fa84b31675e 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -67,12 +67,13 @@
nil
(function
(lambda (entry)
- (when (and (file-readable-p entry)
- (file-regular-p entry))
- (let ((zipped (string-match "\\.\\(t?gz\\|\\(ta\\)?Z\\)\\'"
- entry)))
- (or (and unzip-p zipped)
- (and (not unzip-p) (not zipped)))))))))
+ (or (file-directory-p entry)
+ (when (and (file-readable-p entry)
+ (file-regular-p entry))
+ (let ((zipped (string-match "\\.\\(t?gz\\|\\(ta\\)?Z\\)\\'"
+ entry)))
+ (or (and unzip-p zipped)
+ (and (not unzip-p) (not zipped))))))))))
;;;###autoload
(defun pcomplete/bzip2 ()