From a231d514e3879d192fa697f1cd2fd5103218fbd7 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Fri, 27 Dec 2024 17:45:25 +0100 Subject: [PATCH] [.zshrc] Add new kubernetes aliases/functions --- .zshrc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.zshrc b/.zshrc index bdbd854..195792a 100644 --- a/.zshrc +++ b/.zshrc @@ -31,10 +31,10 @@ PROMPT_EOL_MARK='' ##### aliases ###### -alias atuin_delete='atuin search --delete --search-mode=full-text $1' -alias atuin_search='atuin search --search-mode=full-text $1' -alias bat='bat --style=plain --paging=never --theme=Nord $*' -alias batdiff='bat --style=changes --paging=never --theme=Nord $*' +alias atuin_delete='atuin search --delete --search-mode=full-text' +alias atuin_search='atuin search --search-mode=full-text' +alias bat='bat --style=plain --paging=never --theme=Nord' +alias batdiff='bat --style=changes --paging=never --theme=Nord' alias bkpwd='rm -rf ${PWD}.bak ; cp -a $PWD{,.bak}' alias chromium-socks='chromium --proxy-server=socks://localhost:3000' alias curlh='curl -sD - -o /dev/null' @@ -49,6 +49,8 @@ alias icat='kitten icat --align=left' alias idiff='kitten diff' alias issh='kitten ssh' alias k=kubectl +alias kgy='kubectl get -o yaml' +alias kready='kubectl get --raw="/readyz?verbose"' alias ls='ls --group-directories-first --color=auto --hyperlink=auto' alias mknamedvenv='mkvirtualenv $(basename $PWD) -r requirements.txt' alias neovim=nvim @@ -100,6 +102,10 @@ knodes () { } | [.name,.type,.karpenter,.capacity,.registered,.initialized] | @tsv' } +kpretty () { + kubectl get -o yaml $* | kubectl neat | bat --language=yaml +} + siteinfo () { local url=$(echo "$1" | sed 's#^https\?://##') local ip="$(dig +short "$url" | tail -1)"