]> git.eshelyaron.com Git - emacs.git/commitdiff
Add file completion for git apply, am to pcomplete
authorAntero Mejr <mail@antr.me>
Tue, 28 Jan 2025 18:39:10 +0000 (13:39 -0500)
committerEshel Yaron <me@eshelyaron.com>
Tue, 18 Feb 2025 08:58:39 +0000 (09:58 +0100)
* lisp/pcmpl-git.el (pcomplete/git): Add an "apply" and "am" clause to
complete all files.  (Bug#76356)

(cherry picked from commit 9cedb434ee390a30a690e9f979428c5735cb88e5)

lisp/pcmpl-git.el

index a9a4f2b20f5ad7afb512ecbfab15308fa177f03c..bdb62e43d4e2d06b72aa08bc8dcd10a86fc36e5a 100644 (file)
@@ -114,7 +114,10 @@ Files listed by `git ls-files ARGS' satisfy the predicate."
                ;; Complete remotes and their revisions
                ((or "fetch" "pull" "push")
                 (pcomplete-here (process-lines vc-git-program "remote"))
-                (pcomplete-here (pcmpl-git--remote-refs (pcomplete-arg 1)))))))))
+                (pcomplete-here (pcmpl-git--remote-refs (pcomplete-arg 1))))
+               ;; Complete all files
+               ((or "apply" "am")
+                (pcomplete-here (pcomplete-entries))))))))
 
 (provide 'pcmpl-git)
 ;;; pcmpl-git.el ends here