Skip to content

Commit

Permalink
misc(zsh): run kubectl via command
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Mar 24, 2024
1 parent af450f7 commit d26c143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zsh/config.d/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ function current_architecture () {

function current_context () {
if command -v kubectl > /dev/null; then
kubectl config current-context &> /dev/null
command kubectl config current-context &> /dev/null
kubectl_exit_code=$?
if [ "$kubectl_exit_code" -eq 0 ]; then
echo "[%{$fg[blue]%}$(kubectl config current-context)%{${reset_color}%}] "
echo "[%{$fg[blue]%}$(command kubectl config current-context)%{${reset_color}%}] "
else
echo ""
fi
Expand Down

0 comments on commit d26c143

Please sign in to comment.