Skip to content

Commit

Permalink
Fix kubectl alias when kubecolor is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Feb 22, 2024
1 parent acbd9f4 commit d70e5b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion home/dot_bash_aliases.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# in order to keep the same aliases on both shells. So keep in mind that any
# code here must be compatible with bash and zsh.

if command -v kubectl >/dev/null; then
if command -v kubectl >/dev/null && command -v kubecolor >/dev/null; then
alias kubectl="kubecolor"
fi

Expand Down
5 changes: 5 additions & 0 deletions home/dot_profile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if [ -d "${HOME}/.local/bin" ]; then
export PATH="${HOME}/.local/bin:${PATH}"
fi

if [ -x "${HOME}/.local/bin/pkgx" ]; then
# shellcheck disable=SC2312
eval "$("${HOME}/.local/bin/pkgx" --shellcode)"
fi

export VISUAL="# {{ .editor }}"
export EDITOR="# {{ .editor }}"

Expand Down

0 comments on commit d70e5b7

Please sign in to comment.