dotfiles/talon/community/community-cursorless-0.4.0/apps/kubectl/kubectl.py
2024-11-16 20:27:38 -07:00

26 lines
590 B
Python

from talon import Module, Context
mod = Module()
mod.tag("kubectl", desc="tag for enabling kubectl commands in your terminal")
kubectl = "kubectl"
ctx = Context()
ctx.matches = r"""
tag: user.kubectl
"""
mod.list("kubectl_action", desc="actions performed by kubectl")
ctx.lists["self.kubectl_action"] = ("get", "delete", "describe", "label")
mod.list("kubectl_object", desc="objects performed by kubectl")
ctx.lists["self.kubectl_object"] = (
"nodes",
"jobs",
"pods",
"namespaces",
"services",
"events",
"deployments",
"replicasets",
"daemonsets",
)