summaryrefslogtreecommitdiff
path: root/lisp/pcmpl-gnu.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/pcmpl-gnu.el')
-rw-r--r--lisp/pcmpl-gnu.el36
1 files changed, 35 insertions, 1 deletions
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index 3c9bf1ec9d2..cdfde5640a7 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -394,6 +394,40 @@ Return the new list."
(while (pcomplete-here (pcomplete-dirs) nil #'identity))))
;;;###autoload
-(defalias 'pcomplete/gdb 'pcomplete/xargs)
+(defun pcomplete/awk ()
+ "Completion for the `awk' command."
+ (pcomplete-here-using-help "awk --help"
+ :margin "\t"
+ :separator " +"
+ :description "\0"
+ :metavar "[=a-z]+"))
+
+;;;###autoload
+(defun pcomplete/gpg ()
+ "Completion for the `gpg` command."
+ (pcomplete-here-using-help "gpg --help" :narrow-end "^ -se"))
+
+;;;###autoload
+(defun pcomplete/gdb ()
+ "Completion for the `gdb' command."
+ (while
+ (cond
+ ((string= "--args" (pcomplete-arg 1))
+ (funcall pcomplete-command-completion-function)
+ (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
+ pcomplete-default-completion-function)))
+ ((string-prefix-p "-" (pcomplete-arg 0))
+ (pcomplete-here (pcomplete-from-help "gdb --help")))
+ (t (pcomplete-here (pcomplete-entries))))))
+
+;;;###autoload
+(defun pcomplete/emacs ()
+ "Completion for the `emacs' command."
+ (pcomplete-here-using-help "emacs --help" :margin "^\\(\\)-"))
+
+;;;###autoload
+(defun pcomplete/emacsclient ()
+ "Completion for the `emacsclient' command."
+ (pcomplete-here-using-help "emacsclient --help" :margin "^\\(\\)-"))
;;; pcmpl-gnu.el ends here