From 3343891ea6e8fd84632fabc6bc11a43f8b024e9e Mon Sep 17 00:00:00 2001 From: Vitul Rana Date: Mon, 7 Mar 2022 15:08:56 +0530 Subject: [PATCH] feat(kubectl): add aliases for job management (#9992) --- plugins/kubectl/README.md | 5 +++++ plugins/kubectl/kubectl.plugin.zsh | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index f6651c8cd..f77788482 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -120,6 +120,11 @@ plugins=(... kubectl) | kecj | `kubectl edit cronjob` | Edit CronJob from the default editor | | kdcj | `kubectl describe cronjob` | Describe a CronJob in details | | kdelcj | `kubectl delete cronjob` | Delete the CronJob | +| | | **Job management** | +| kgj | `kubectl get job` | List all Job in ps output format | +| kej | `kubectl edit job` | Edit a Job in details | +| kdj | `kubectl describe job` | Describe the Job | +| kdelj | `kubectl delete job` | Delete the Job | ## Wrappers diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 89efeaca5..3e87c2395 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -178,6 +178,12 @@ alias kecj='kubectl edit cronjob' alias kdcj='kubectl describe cronjob' alias kdelcj='kubectl delete cronjob' +# Job management. +alias kgj='kubectl get job' +alias kej='kubectl edit job' +alias kdj='kubectl describe job' +alias kdelj='kubectl delete job' + # Only run if the user actually has kubectl installed if (( ${+_comps[kubectl]} )); then function kj() { kubectl "$@" -o json | jq; }