]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow pcomplete/gzip to complete on files in subdirectories
authorStefan Kangas <stefan@marxist.se>
Tue, 27 Oct 2020 02:09:44 +0000 (03:09 +0100)
committerStefan Kangas <stefan@marxist.se>
Tue, 27 Oct 2020 02:09:44 +0000 (03:09 +0100)
* lisp/pcmpl-gnu.el (pcmpl-gnu-zipped-files): Allow "gzip" to complete
on files in subdirectories.  (Bug#30271)

lisp/pcmpl-gnu.el

index d7c5b381d29e95be08bd80ce8419dfe542141374..fa84b31675ea942c779fa5216fea16225b3507b9 100644 (file)
    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 ()