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>
This commit is contained in:
Antero Mejr 2023-10-15 00:32:57 +00:00 committed by Stefan Kangas
parent 9be8011217
commit cfc796f6f2
2 changed files with 12 additions and 0 deletions

View file

@ -491,6 +491,10 @@ When this option is non-nil, remote file names are not completed by
Pcomplete. Packages, like 'shell-mode', could set this in order to
suppress remote file name completion at all.
---
*** Completion for the 'doas' command has been added.
Command completion for 'doas' in Eshell and Shell mode will now work.
** Shell Mode
+++

View file

@ -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