emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 25a5764: Allow pcomplete/gzip to complete on files in subdirector


From: Stefan Kangas
Subject: master 25a5764: Allow pcomplete/gzip to complete on files in subdirectories
Date: Mon, 26 Oct 2020 22:13:14 -0400 (EDT)

branch: master
commit 25a57640c59e1630ad31b766a7a92abab856a284
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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)
---
 lisp/pcmpl-gnu.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index d7c5b38..fa84b31 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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]