From 1258fedec4c20f9edec4c01ad7d7fffa4b1437b6 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 23 Oct 2008 22:09:09 +0000 Subject: [PATCH] (pcomplete/rpm): Make "rpm -qp" use file completion. --- lisp/pcmpl-rpm.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index 99e42e87edd..19dca7564a5 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -135,7 +135,9 @@ You can use \\[report-emacs-bug] to do so." (pcmpl-rpm-all-query "--requires"))))) (if (pcomplete-match "^-" 0) (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") - (pcomplete-here (pcmpl-rpm-packages))))) + (if (pcomplete-test "-[^-]*p" 'first 1) + (pcomplete-here (pcmpl-rpm-files)) + (pcomplete-here (pcmpl-rpm-packages)))))) ((pcomplete-test "--pipe") (pcomplete-here* (funcall pcomplete-command-completion-function))) ((pcomplete-test "--rmsource") -- 2.39.5