aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntero Mejr2023-10-15 00:32:57 +0000
committerStefan Kangas2023-10-23 00:42:05 +0200
commitcfc796f6f24efd7cbc0dcac07f8eccd5200236bd (patch)
tree4bb57e13a76f403461e2b8a3ee99ac2838eda001
parent9be8011217b8824659c8c69679b33756e240b013 (diff)
downloademacs-cfc796f6f24efd7cbc0dcac07f8eccd5200236bd.tar.gz
emacs-cfc796f6f24efd7cbc0dcac07f8eccd5200236bd.zip
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>
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/pcmpl-unix.el8
2 files changed, 12 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index a3639620ebb..d0880669752 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -491,6 +491,10 @@ When this option is non-nil, remote file names are not completed by
491Pcomplete. Packages, like 'shell-mode', could set this in order to 491Pcomplete. Packages, like 'shell-mode', could set this in order to
492suppress remote file name completion at all. 492suppress remote file name completion at all.
493 493
494---
495*** Completion for the 'doas' command has been added.
496Command completion for 'doas' in Eshell and Shell mode will now work.
497
494** Shell Mode 498** Shell Mode
495 499
496+++ 500+++
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."
685 (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) 685 (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
686 pcomplete-default-completion-function))) 686 pcomplete-default-completion-function)))
687 687
688;;;###autoload
689(defun pcomplete/doas ()
690 "Completion for the `doas' command."
691 (pcomplete-opt "C(pcomplete-entries)Lnsu(pcmpl-unix-user-names)")
692 (funcall pcomplete-command-completion-function)
693 (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
694 pcomplete-default-completion-function)))
695
688(provide 'pcmpl-unix) 696(provide 'pcmpl-unix)
689 697
690;;; pcmpl-unix.el ends here 698;;; pcmpl-unix.el ends here