chore: install bash_completions and kubectl completions

pull/7/head
Adam Veldhousen 2021-10-25 15:50:56 -05:00
parent 73e9243bec
commit 027e13660f
No known key found for this signature in database
GPG Key ID: 2659715981640EFB
3 changed files with 11 additions and 7 deletions

View File

@ -12,4 +12,4 @@ fi
for file in "${FILES_EXTRAS_DIR}"/*; do
[[ -f "${file}" ]] && source "${file}";
done;
done;

View File

@ -1,11 +1,7 @@
#!/bin/env bash
if [[ -f "$(which brew 2>&1)" ]]; then
brew install kubectl;
fi
if [[ -f "$(which kubectl)" ]] && [[ -d "$(brew --prefix bash-completion)/etc/bash_completion.d" ]]; then
kubectl completion bash > "$(brew --prefix bash-completion)/etc/bash_completion.d/kubectl";
if [[ -f "$(which kubectl)" ]]; then
[[ -f "$(brew --prefix bash-completion)/etc/bash_completion.d/kubectl" ]] || kubectl completion bash > $(brew --prefix bash-completion)/etc/bash_completion.d/kubectl;
fi
# This command is used a LOT both below and in daily life
@ -101,6 +97,7 @@ kres(){
# Rollout management.
alias kgrs='kubectl get rs'
alias kdrs='kubectl describe rs'
alias krh='kubectl rollout history'
alias kru='kubectl rollout undo'

View File

@ -58,6 +58,13 @@ load_env() {
files_debug_log "[load_env] \$FILES_ROOT = ${FILES_ROOT}";
export FILES_USER_CONFIG="${HOME}/.config";
export FILES_CACHE_DIR="${FILES_ROOT}/.tmp/";
if [[ -d "${FILES_CACHE_DIR}" ]]; then
files_debug_log "[load env] Setting up cache directory @ ${FILES_CACHE_DIR}";
mkdir -p ${FILES_CACHE_DIR};
fi
if [[ -z "${FILES_PLUGINS}" ]]; then
export FILES_PLUGINS=("brew" "ssh" "vim" "git-extras" "asdf" "helm" "starship" "extras");
fi