# HG changeset patch # User Chong Yidong # Date 1224799749 0 # Node ID d78006bea8797522aefd474ffa8b9772a17ac84b # Parent df7905beb96c5d2d424df44cdd0f1c1f74d81136 (pcomplete/rpm): Make "rpm -qp" use file completion. diff -r df7905beb96c -r d78006bea879 lisp/pcmpl-rpm.el --- a/lisp/pcmpl-rpm.el Thu Oct 23 22:09:00 2008 +0000 +++ b/lisp/pcmpl-rpm.el Thu Oct 23 22:09:09 2008 +0000 @@ -135,7 +135,9 @@ (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")