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)
This commit is contained in:
Stefan Kangas 2020-10-27 03:09:44 +01:00
parent cfc70e51c2
commit 25a57640c5

View file

@ -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 ()