From: Stefan Kangas Date: Tue, 27 Oct 2020 02:09:44 +0000 (+0100) Subject: Allow pcomplete/gzip to complete on files in subdirectories X-Git-Tag: emacs-28.0.90~5407 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=25a57640c59e1630ad31b766a7a92abab856a284;p=emacs.git 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) --- 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 ()