summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcmpl-tailscale.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/pcmpl-tailscale.el b/pcmpl-tailscale.el
index 68c424a..a5cf059 100644
--- a/pcmpl-tailscale.el
+++ b/pcmpl-tailscale.el
@@ -4,7 +4,7 @@
;; Copyright (C) 2024 Thanos Apollo
;; Author: Thanos Apollo <[email protected]>
-;; Keywords: pcomplete completions emerge gentoo
+;; Keywords: comm extensions
;; URL: https://git.thanosapollo.com/pcmpl-tailscale
;; Version: 0.0.1
@@ -44,13 +44,8 @@
"--advertise-routes" "--advertise-exit-node"
"--advertise-connector" "--advertise-risk"))
-(defvar pcmpl-tailscale-true-or-false '("true" "false"))
-
-(defvar pcmpl-tailscale-serve-subcommands '("status" "reset"))
-
-
(defun pcmpl-tailscale-get-exit-nodes ()
- "Return a list of ip addresses of tailscale exit nodes."
+ "Return a list of ip addresses of pcmpl-tailscale exit nodes."
(let* ((output (shell-command-to-string "tailscale exit-node list"))
(exit-nodes (split-string output "\n"))) ;; Split output into lines.
(cl-loop for ip in exit-nodes
@@ -59,13 +54,14 @@
;;;###autoload
(defun pcomplete/tailscale ()
- "Completion for `tailscale'"
+ "Completion for `tailscale'."
(pcomplete-here pcmpl-tailscale-subcommands)
(cond ((string= (pcomplete-arg 1) "set")
(pcomplete-here pcmpl-tailscale-subcommand-set-flags)
- (cond ((pcomplete-match "--exit-node" 1)
+ (cond ((pcomplete-match "--exit-node" 1)
(pcomplete-here (pcmpl-tailscale-get-exit-nodes)))))
((string= (pcomplete-arg 1) "exit-node")
(pcomplete-here '("list")))))
(provide 'pcmpl-tailscale)
+;;; pcmpl-tailscale.el ends here