1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

2 Commits

Author SHA1 Message Date
Firas Bouzguenda
b04e01d418 feat(kubectl): add aliases for kubectl rollout restart (#12883)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
2025-11-22 18:31:03 +01:00
StavShukrunRise
15bcada010 feat(pulumi): add plugin for Pulumi CLI (#13041)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
2025-11-22 18:11:40 +01:00
4 changed files with 74 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ plugins=(... kubectl)
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
| | | **Pod management** |
| kgp | `kubectl get pods` | List all pods in ps output format |
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
@@ -74,6 +74,7 @@ plugins=(... kubectl)
| kdeld | `kubectl delete deployment` | Delete the deployment |
| ksd | `kubectl scale deployment` | Scale a deployment |
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
| krrd | `kubectl rollout restart deployment` | Rollout restart a deployment |
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
| | | **Rollout management** |
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
@@ -112,6 +113,7 @@ plugins=(... kubectl)
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
| ksss | `kubectl scale statefulset` | Scale a statefulset |
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
| krrss | `kubectl rollout restart statefulset` | Rollout restart a statefulset |
| | | **Service Accounts management** |
| kdsa | `kubectl describe sa` | Describe a service account in details |
| kdelsa | `kubectl delete sa` | Delete the service account |

View File

@@ -98,6 +98,7 @@ alias kdd='kubectl describe deployment'
alias kdeld='kubectl delete deployment'
alias ksd='kubectl scale deployment'
alias krsd='kubectl rollout status deployment'
alias krrd='kubectl rollout restart deployment'
function kres(){
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
@@ -120,6 +121,7 @@ alias kdss='kubectl describe statefulset'
alias kdelss='kubectl delete statefulset'
alias ksss='kubectl scale statefulset'
alias krsss='kubectl rollout status statefulset'
alias krrss='kubectl rollout restart statefulset'
# Port forwarding
alias kpf="kubectl port-forward"

41
plugins/pulumi/README.md Normal file
View File

@@ -0,0 +1,41 @@
# Pulumi
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastucture.
This plugin provides:
- 🚀 Short, intuitive aliases for common Pulumi commands
- 🎯 Auto-completion support for Pulumi
To use it, add `pulumi` to the plugins array in your `.zshrc` file:
```zsh
plugins=(... pulumi)
```
## ⚡ Aliases
| Alias | Command | Description |
| -------- | ---------------------- | ----------------------------- |
| `pul` | `pulumi` | Shortcut for Pulumi CLI |
| `pulcs` | `pulumi config set` | Set Pulumi configuration |
| `puld` | `pulumi destroy` | Destroy all resources |
| `pullog` | `pulumi logs -f` | Tail Pulumi logs in real-time |
| `pulp` | `pulumi preview` | Show planned changes |
| `pulr` | `pulumi refresh` | Refresh state from cloud |
| `puls` | `pulumi stack` | Show stack details |
| `pulsh` | `pulumi stack history` | Show stack history |
| `pulsi` | `pulumi stack init` | Initialize a new stack |
| `pulsl` | `pulumi stack ls` | List available stacks |
| `pulso` | `pulumi stack output` | Show stack outputs |
| `pulss` | `pulumi stack select` | Switch stack |
| `pulu` | `pulumi up` | Deploy infrastructure |
## 🎯 Autocompletion
If `pulumi gen-completion zsh` is available, this plugin **automatically loads Pulumi auto-completion**.
## 🛠️ Contribution
Feel free to open an issue or PR for improvements! 🚀

View File

@@ -0,0 +1,28 @@
if (( ! $+commands[pulumi] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `pulumi`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pulumi" ]]; then
typeset -g -A _comps
autoload -Uz _pulumi
_comps[pulumi]=_pulumi
fi
pulumi gen-completion zsh >| "$ZSH_CACHE_DIR/completions/_pulumi" &|
# Aliases
alias pul='pulumi'
alias pulcs='pulumi config set'
alias puld='pulumi destroy'
alias pullog='pulumi logs -f'
alias pulp='pulumi preview'
alias pulr='pulumi refresh'
alias puls='pulumi stack'
alias pulsh='pulumi stack history'
alias pulsi='pulumi stack init'
alias pulsl='pulumi stack ls'
alias pulso='pulumi stack output'
alias pulss='pulumi stack select'
alias pulu='pulumi up'