diff --git a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh b/dot_config/bash/bashrc.d/brew.sh.tmpl similarity index 54% rename from hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh rename to dot_config/bash/bashrc.d/brew.sh.tmpl index b1c31d1..6e30f1c 100644 --- a/hellotech/.config/bash/bashrc.d/hellotech-bash-completion.sh +++ b/dot_config/bash/bashrc.d/brew.sh.tmpl @@ -1,16 +1,8 @@ +{{ if lookPath "brew" -}} # vi: ft=bash - if command -v brew &> /dev/null; then if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then . "$(brew --prefix)/share/bash-completion/bash_completion" fi fi - -if command -v kubectl > /dev/null 2>&1; then - source <(kubectl completion bash) -fi - -if command -v helm > /dev/null 2>&1; then - source <(helm completion bash) -fi - +{{- end }} diff --git a/dot_config/bash/bashrc.d/helm.sh.tmpl b/dot_config/bash/bashrc.d/helm.sh.tmpl new file mode 100644 index 0000000..4b94c48 --- /dev/null +++ b/dot_config/bash/bashrc.d/helm.sh.tmpl @@ -0,0 +1,6 @@ +{{ if lookPath "helm" -}} +# vi: ft=bash +if command -v helm > /dev/null 2>&1; then + source <(helm completion bash) +fi +{{- end }} diff --git a/dot_config/bash/bashrc.d/kubectl.sh.tmpl b/dot_config/bash/bashrc.d/kubectl.sh.tmpl new file mode 100644 index 0000000..453819e --- /dev/null +++ b/dot_config/bash/bashrc.d/kubectl.sh.tmpl @@ -0,0 +1,6 @@ +{{ if lookPath "kubectl" -}} +# vi: ft=bash +if command -v kubectl > /dev/null 2>&1; then + source <(kubectl completion bash) +fi +{{- end }} diff --git a/hellotech/.config/fish/completions/hellotech.fish b/dot_config/fish/completions/helm.fish.tmpl similarity index 71% rename from hellotech/.config/fish/completions/hellotech.fish rename to dot_config/fish/completions/helm.fish.tmpl index 971a9c0..b381531 100644 --- a/hellotech/.config/fish/completions/hellotech.fish +++ b/dot_config/fish/completions/helm.fish.tmpl @@ -1,4 +1,6 @@ +{{ if lookPath "helm" -}} # vim: ft=sh if command -v helm > /dev/null 2>&1; then eval "$(helm completion fish)" fi +{{- end }} diff --git a/hellotech/.config/git/config-hellotech b/dot_config/git/config-hellotech.tmpl similarity index 73% rename from hellotech/.config/git/config-hellotech rename to dot_config/git/config-hellotech.tmpl index 7c6f31d..4a07c7c 100644 --- a/hellotech/.config/git/config-hellotech +++ b/dot_config/git/config-hellotech.tmpl @@ -1,5 +1,7 @@ +{{ if and .hellotech (lookPath "git") -}} [url "git@github.com:HelloTech"] insteadOf = https://github.com/HelloTech email = buddy@hellotech.com [init] templateDir = ~/.config/git/template +{{- end }} diff --git a/hellotech/.config/git/template/hooks/prepare-commit-msg b/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl old mode 100755 new mode 100644 similarity index 93% rename from hellotech/.config/git/template/hooks/prepare-commit-msg rename to dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl index d40daea..dee6fc7 --- a/hellotech/.config/git/template/hooks/prepare-commit-msg +++ b/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl @@ -1,4 +1,6 @@ +{{ if and .hellotech (lookPath "node") -}} #!/usr/bin/env node +// vim: ft=javascript const fs = require("fs"); const childProcess = require("child_process"); @@ -48,3 +50,4 @@ main().catch(err => { console.error(err); process.exit(1); }); +{{- end }} diff --git a/hellotech/.config/profile/env.d/hellotech.env b/dot_config/profile/env.d/hellotech.env.tmpl similarity index 73% rename from hellotech/.config/profile/env.d/hellotech.env rename to dot_config/profile/env.d/hellotech.env.tmpl index e8c50af..49da87d 100644 --- a/hellotech/.config/profile/env.d/hellotech.env +++ b/dot_config/profile/env.d/hellotech.env.tmpl @@ -1,3 +1,5 @@ +{{ if .hellotech -}} # shellcheck disable=SC2034 GOPRIVATE=github.com/HelloTech PULUMI_SKIP_UPDATE_CHECK=true +{{- end }} diff --git a/hellotech/.config/profile/profile.d/hellotech.sh b/dot_config/profile/profile.d/hellotech.sh.tmpl similarity index 94% rename from hellotech/.config/profile/profile.d/hellotech.sh rename to dot_config/profile/profile.d/hellotech.sh.tmpl index bc145ac..bac6abe 100644 --- a/hellotech/.config/profile/profile.d/hellotech.sh +++ b/dot_config/profile/profile.d/hellotech.sh.tmpl @@ -1,3 +1,4 @@ +{{ if .hellotech -}} #!/usr/bin/env bash k8s_last_config () ( @@ -22,3 +23,4 @@ _add_path "/usr/local/opt/mysql-client/bin" _add_path "${HOME}/google-cloud-sdk/bin" unset _add_path +{{- end }} diff --git a/dot_config/zsh/zshrc.d/helm.zsh.tmpl b/dot_config/zsh/zshrc.d/helm.zsh.tmpl new file mode 100644 index 0000000..6130505 --- /dev/null +++ b/dot_config/zsh/zshrc.d/helm.zsh.tmpl @@ -0,0 +1,11 @@ +{{ if lookPath "helm" -}} +# shellcheck disable=SC2148,SC1090 + +autoload -U +X compinit && compinit + +if command -v helm > /dev/null 2>&1 ; then + source <(helm completion zsh) +fi + +# vim: ft=bash +{{- end }} diff --git a/hellotech/.config/zsh/zshrc.d/hellotech.zsh b/dot_config/zsh/zshrc.d/kubectl.zsh.tmpl similarity index 68% rename from hellotech/.config/zsh/zshrc.d/hellotech.zsh rename to dot_config/zsh/zshrc.d/kubectl.zsh.tmpl index c4eb639..24361ed 100644 --- a/hellotech/.config/zsh/zshrc.d/hellotech.zsh +++ b/dot_config/zsh/zshrc.d/kubectl.zsh.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "kubectl" -}} # shellcheck disable=SC2148,SC1090 autoload -U +X compinit && compinit @@ -6,8 +7,5 @@ if command -v kubectl > /dev/null 2>&1; then source <(kubectl completion zsh) fi -if command -v helm > /dev/null 2>&1 ; then - source <(helm completion zsh) -fi - # vim: ft=bash +{{- end }} diff --git a/hellotech/.jq/ht.jq b/dot_jq/ht.jq.tmpl similarity index 97% rename from hellotech/.jq/ht.jq rename to dot_jq/ht.jq.tmpl index 4c03e52..6fde48b 100644 --- a/hellotech/.jq/ht.jq +++ b/dot_jq/ht.jq.tmpl @@ -1,3 +1,4 @@ +{{ if and .hellotech (lookPath "jq") -}} import "colors" as colors; def clean_multierror: @@ -75,3 +76,4 @@ def show: "\n" + colors::red + "ERROR" + colors::reset + ": " + _show_error else "" end ) + colors::reset; +{{- end }} diff --git a/hellotech/.local/bin/install-circleci b/dot_local/bin/executable_install-circleci similarity index 100% rename from hellotech/.local/bin/install-circleci rename to dot_local/bin/executable_install-circleci diff --git a/hellotech/.local/bin/install-helm-home b/dot_local/bin/executable_install-helm similarity index 100% rename from hellotech/.local/bin/install-helm-home rename to dot_local/bin/executable_install-helm diff --git a/hellotech/.local/bin/install-linkerd-home b/dot_local/bin/executable_install-linkerd similarity index 100% rename from hellotech/.local/bin/install-linkerd-home rename to dot_local/bin/executable_install-linkerd diff --git a/hellotech/.local/bin/install-traefik-home b/dot_local/bin/executable_install-traefik similarity index 100% rename from hellotech/.local/bin/install-traefik-home rename to dot_local/bin/executable_install-traefik