diff --git a/modules/cli/zsh/default.nix b/modules/cli/zsh/default.nix index e62eca7..2922ca3 100644 --- a/modules/cli/zsh/default.nix +++ b/modules/cli/zsh/default.nix @@ -57,13 +57,16 @@ kgy = "k get -o yaml"; kgw = "k get -w"; kd = "k describe"; - ka = "k describe"; + ka = "k apply"; + kaf = "k apply -f"; ke = "k edit"; kl = "k logs"; kp = "k patch"; kr = "k rollout"; kpf = "k port-forward"; kdel = "k delete"; + kdelf = "k delete -f"; + kcleanup = "kdel pod --field-selector status.phase==Failed -A; kdel pod --field-selector status.phase==Succeeded -A"; # Misc dc = "docker-compose"; @@ -207,7 +210,7 @@ '') (lib.mkOrder 1000 (builtins.readFile ./init.zsh)) (lib.mkOrder 1400 '' - # only start atuin if it's in the path (fix distrox or other temp fs issues) + # only start atuin if it's in the path (fix distrobox or other temp fs issues) if command -v atuin > /dev/null && [[ $options[zle] = on ]]; then eval "$(atuin init zsh ${lib.escapeShellArgs config.programs.atuin.flags})" fi diff --git a/modules/cli/zsh/init.zsh b/modules/cli/zsh/init.zsh index 175d8d6..f6278bf 100644 --- a/modules/cli/zsh/init.zsh +++ b/modules/cli/zsh/init.zsh @@ -22,6 +22,10 @@ bindkey '^Z' foreground (whence -w run-help | grep -q alias) && unalias run-help autoload run-help +autoload edit-command-line +zle -N edit-command-line +bindkey '^Xe' edit-command-line + # Allow customization per client. [[ -f ~/.config/zsh/custom.zsh ]] && source ~/.config/zsh/custom.zsh