From a9abfcda8609b6086bda63d5b15e3a21ac693d5b Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Tue, 12 Nov 2024 16:04:15 +0100 Subject: [PATCH] Add KK post alias and disable aws CLI --- zsh.d/30-aliases.zsh | 1 + zsh.d/zshfunctions/awsprofile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zsh.d/30-aliases.zsh b/zsh.d/30-aliases.zsh index 7d2ab1c..bfebb9d 100644 --- a/zsh.d/30-aliases.zsh +++ b/zsh.d/30-aliases.zsh @@ -40,6 +40,7 @@ alias kk='kubectl konfig merge ~/.kube/configs/* > ~/.kube/config' # alias -g G="|grep " alias -g K="-o yaml | kubectl neat | less" +alias -g KK="-o yaml | less" alias -g L="|less" alias -g NO="> /dev/null" alias -g NE="2> /dev/null" diff --git a/zsh.d/zshfunctions/awsprofile b/zsh.d/zshfunctions/awsprofile index a371db6..10afaae 100644 --- a/zsh.d/zshfunctions/awsprofile +++ b/zsh.d/zshfunctions/awsprofile @@ -37,7 +37,7 @@ if [ $profile ]; then # We got a profile pattern, look for a match fi if [ $match ]; then # Single match, setting profile - export AWS_CLI_AUTO_PROMPT=off + # export AWS_CLI_AUTO_PROMPT=off # Set default profile and profile export AWS_DEFAULT_PROFILE=$match @@ -48,7 +48,7 @@ if [ $profile ]; then # We got a profile pattern, look for a match export AWS_REGION=${region:-$AWS_DEFAULT_REGION} print -P "$FX[bold]activating profile $FG[075]$match$FX[reset]$FX[bold] on region $FG[075]$AWS_REGION$FX[reset]" - export AWS_CLI_AUTO_PROMPT=on + # export AWS_CLI_AUTO_PROMPT=on return else print -P "$FX[bold]$FG[009]no match for $profile$FX[reset]"