Better aliases
This commit is contained in:
parent
1e22523291
commit
a6da6880ba
|
@ -112,6 +112,10 @@ fi
|
|||
command -v kubectl > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
if [ -f $HOME/.kubes/current-cube ]; then
|
||||
export KUBECONFIG=$(cat $HOME/.kubes/current-cube)
|
||||
fi
|
||||
|
||||
# Sets the kube config
|
||||
kube() {
|
||||
local kube_config=$HOME/.kubes/$1/config
|
||||
|
@ -122,6 +126,7 @@ if [ $? -eq 0 ]; then
|
|||
echo >&2 error: no such kube config: $kube_config
|
||||
return 1
|
||||
else
|
||||
echo $kube_config > ~/.kubes/current-cube
|
||||
export KUBECONFIG=$kube_config
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -76,8 +76,15 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
git_prompt_info_no_space() {
|
||||
local info=$(git_prompt_info)
|
||||
if [ ! -z $info ]; then
|
||||
echo " $info"
|
||||
fi
|
||||
}
|
||||
|
||||
local return_code=""
|
||||
local git_branch=' $(git_prompt_info)'
|
||||
local git_branch='$(git_prompt_info_no_space)'
|
||||
|
||||
local PR_DATE='${PR_BOLD}${PR_MAGENTA}[%D{%H:%M}]${PR_NO_COLOR}'
|
||||
|
||||
|
|
Loading…
Reference in New Issue