summaryrefslogtreecommitdiff
path: root/lisp/pcmpl-unix.el
diff options
context:
space:
mode:
authorAntero Mejr <antero@mailbox.org>2023-10-15 00:32:57 +0000
committerStefan Kangas <stefankangas@gmail.com>2023-10-23 00:42:05 +0200
commitcfc796f6f24efd7cbc0dcac07f8eccd5200236bd (patch)
tree4bb57e13a76f403461e2b8a3ee99ac2838eda001 /lisp/pcmpl-unix.el
parent9be8011217b8824659c8c69679b33756e240b013 (diff)
downloademacs-cfc796f6f24efd7cbc0dcac07f8eccd5200236bd.tar.gz
Add completion for 'doas' to pcomplete
* lisp/pcmpl-unix.el (pcomplete/doas): New function. * etc/NEWS: Announce. (Bug#66551) Co-authored-by: Visuwesh <visuweshm@gmail.com>
Diffstat (limited to 'lisp/pcmpl-unix.el')
-rw-r--r--lisp/pcmpl-unix.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el
index e6b67256a4c..7af5f2bce74 100644
--- a/lisp/pcmpl-unix.el
+++ b/lisp/pcmpl-unix.el
@@ -685,6 +685,14 @@ Includes files as well as host names followed by a colon."
(funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
pcomplete-default-completion-function)))
+;;;###autoload
+(defun pcomplete/doas ()
+ "Completion for the `doas' command."
+ (pcomplete-opt "C(pcomplete-entries)Lnsu(pcmpl-unix-user-names)")
+ (funcall pcomplete-command-completion-function)
+ (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
+ pcomplete-default-completion-function)))
+
(provide 'pcmpl-unix)
;;; pcmpl-unix.el ends here