Add delimiter template directives to avoid syntax errors
This commit is contained in:
parent
d65e18856b
commit
84a09058d0
@ -1,22 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=bash */}}
|
||||||
|
|
||||||
. "${HOME}/.profile"
|
source "${HOME}/.profile"
|
||||||
|
|
||||||
# if not running interactively, don't do anything more
|
# if not running interactively, don't do anything more
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
{{- if not (lookPath "starship") }}
|
#{{- if not (lookPath "starship") }}
|
||||||
if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
|
if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${XDG_CONFIG_HOME}/bash/prompt.sh"
|
source "${XDG_CONFIG_HOME}/bash/prompt.sh"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then
|
if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then
|
||||||
for file in "${XDG_CONFIG_HOME}"/bash/bashrc.d/*.sh; do
|
for file in "${XDG_CONFIG_HOME}"/bash/bashrc.d/*.sh; do
|
||||||
if [ -r "$file" ]; then
|
if [ -r "$file" ]; then
|
||||||
#shellcheck disable=1090
|
#shellcheck disable=1090
|
||||||
. "$file"
|
source "$file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -31,5 +33,3 @@ if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then
|
|||||||
)"
|
)"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim: ft=bash
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /*- vim: filetype=bash */ -}}
|
||||||
if [[ ${BASH_VERSION} != "3.2*" ]]; then
|
if [[ ${BASH_VERSION} != "3.2*" ]]; then
|
||||||
shopt -s autocd
|
shopt -s autocd
|
||||||
fi
|
fi
|
||||||
@ -14,27 +16,25 @@ if [[ ! $PROMPT_COMMAND =~ "history -a" ]]; then
|
|||||||
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{{ if and (lookPath "setxkbmap") (eq .chezmoi.os "linux") -}}
|
#{{ if and (lookPath "setxkbmap") (eq .chezmoi.os "linux") -}}
|
||||||
# Disable capslock
|
# Disable capslock
|
||||||
setxkbmap -option ctrl:nocaps
|
setxkbmap -option ctrl:nocaps
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
{{ if lookPath "lesspipe" -}}
|
#{{ if lookPath "lesspipe" -}}
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
eval "$(SHELL=/bin/sh {{ lookPath "lesspipe" }})"
|
eval "$(SHELL=/bin/sh #{{ lookPath "lesspipe" }})"
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
{{ if lookPath "dircolors" -}}
|
#{{ if lookPath "dircolors" -}}
|
||||||
# enable color support of ls and also add handy aliases
|
# enable color support of ls and also add handy aliases
|
||||||
if test -r ~/.dircolors; then
|
if test -r ~/.dircolors; then
|
||||||
eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
if [[ -d "${XDG_DATA_HOME}/JetBrains/Toolbox/scripts" ]]; then
|
if [[ -d "${XDG_DATA_HOME}/JetBrains/Toolbox/scripts" ]]; then
|
||||||
if [[ ":${PATH}:" != *":${XDG_DATA_HOME}/JetBrains/Toolbox/scripts:"* ]]; then
|
if [[ ":${PATH}:" != *":${XDG_DATA_HOME}/JetBrains/Toolbox/scripts:"* ]]; then
|
||||||
export PATH="${PATH}:${XDG_DATA_HOME}/JetBrains/Toolbox/scripts"
|
export PATH="${PATH}:${XDG_DATA_HOME}/JetBrains/Toolbox/scripts"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim: filetype=bash
|
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=bash */ -}}
|
||||||
|
|
||||||
{{ if stat "/etc/bash_completion" -}}
|
#{{ if stat "/etc/bash_completion" -}}
|
||||||
source /etc/bash_completion
|
source /etc/bash_completion
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if stat "/usr/local/etc/bash_completion" -}}
|
#{{ if stat "/usr/local/etc/bash_completion" -}}
|
||||||
source /usr/local/etc/bash_completion
|
source /usr/local/etc/bash_completion
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if stat "/usr/local/etc/bash_completion.d/" -}}
|
#{{ if stat "/usr/local/etc/bash_completion.d/" -}}
|
||||||
for i in $(ls /usr/local/etc/bash_completion.d/); do
|
for i in $(ls /usr/local/etc/bash_completion.d/); do
|
||||||
if [ -r "/usr/local/etc/bash_completion.d/$i" ]; then
|
if [ -r "/usr/local/etc/bash_completion.d/$i" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
@ -16,49 +17,46 @@ for i in $(ls /usr/local/etc/bash_completion.d/); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
unset i
|
unset i
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "brew" -}}
|
#{{ if lookPath "brew" -}}
|
||||||
if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
|
if [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
|
||||||
. "$(brew --prefix)/share/bash-completion/bash_completion"
|
source "$(brew --prefix)/share/bash-completion/bash_completion"
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "direnv" -}}
|
#{{ if lookPath "direnv" -}}
|
||||||
eval "$(direnv hook bash)"
|
eval "$(direnv hook bash)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "erd" -}}
|
#{{ if lookPath "erd" -}}
|
||||||
eval "$(erd --completions bash)"
|
eval "$(erd --completions bash)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "helm" -}}
|
#{{ if lookPath "helm" -}}
|
||||||
source <(helm completion bash)
|
source <(helm completion bash)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "kubectl" -}}
|
#{{ if lookPath "kubectl" -}}
|
||||||
source <(kubectl completion bash)
|
source <(kubectl completion bash)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "starship" -}}
|
#{{ if lookPath "starship" -}}
|
||||||
source <(starship init bash)
|
source <(starship init bash)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if lookPath "trubka" -}}
|
#{{ if lookPath "trubka" -}}
|
||||||
eval "$(trubka --completion-script-bash)"
|
eval "$(trubka --completion-script-bash)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
|
#{{ if lookPath "rbenv" -}}
|
||||||
{{ if lookPath "rbenv" -}}
|
|
||||||
if [ "${RBENV_SHELL}" = "" ]; then
|
if [ "${RBENV_SHELL}" = "" ]; then
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{ if and (lookPath "rvm") (stat (joinPath .chezmoi.homeDir ".rvm" "bin") ) -}}
|
#{{ if and (lookPath "rvm") (stat (joinPath .chezmoi.homeDir ".rvm" "bin") ) -}}
|
||||||
if [[ ! "${PATH}" =~ ${HOME}/.rvm/bin ]]; then
|
if [[ ! "${PATH}" =~ ${HOME}/.rvm/bin ]]; then
|
||||||
export PATH="$PATH:$HOME/.rvm/bin"
|
export PATH="$PATH:$HOME/.rvm/bin"
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
# vim: filetype=sh
|
|
||||||
|
|||||||
9
dot_config/bash/env.d/base.env.tmpl
Normal file
9
dot_config/bash/env.d/base.env.tmpl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#shellcheck disable=SC2034
|
||||||
|
HISTTIMEFORMAT='%y-%m-%d %T λ '
|
||||||
|
QUOTING_STYLE=literal
|
||||||
|
#{{- if eq .chezmoi.os "darwin" }}
|
||||||
|
#shellcheck disable=SC2034
|
||||||
|
BASH_SILENCE_DEPRECATION_WARNING=1
|
||||||
|
#{{- end }}
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#shellcheck disable=SC2034
|
|
||||||
HISTTIMEFORMAT='%y-%m-%d %T λ '
|
|
||||||
QUOTING_STYLE=literal
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{{ if eq .chezmoi.os "darwin" -}}
|
|
||||||
#shellcheck disable=SC2034
|
|
||||||
BASH_SILENCE_DEPRECATION_WARNING=1
|
|
||||||
{{- end }}
|
|
||||||
@ -1,6 +1,8 @@
|
|||||||
{{ if not (lookPath "starship") -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=bash */ -}}
|
||||||
|
#{{ if not (lookPath "starship") -}}
|
||||||
|
|
||||||
{{ if lookPath "git" -}}
|
#{{ if lookPath "git" -}}
|
||||||
_parse_git_status () (
|
_parse_git_status () (
|
||||||
if [[ $(git status 2> /dev/null | wc -l) -eq 0 ]]; then
|
if [[ $(git status 2> /dev/null | wc -l) -eq 0 ]]; then
|
||||||
return
|
return
|
||||||
@ -14,7 +16,7 @@ _parse_git_status () (
|
|||||||
_parse_git_branch () (
|
_parse_git_branch () (
|
||||||
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
|
||||||
)
|
)
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
_create_prompt() (
|
_create_prompt() (
|
||||||
color_off='\e[0m'
|
color_off='\e[0m'
|
||||||
@ -26,10 +28,10 @@ _create_prompt() (
|
|||||||
|
|
||||||
|
|
||||||
RET="\[$green\]"'\u '"\[$blue\]"'$(hostname -s | tr ':A-Z:' ':a-z:') '"\[$green\]\w "
|
RET="\[$green\]"'\u '"\[$blue\]"'$(hostname -s | tr ':A-Z:' ':a-z:') '"\[$green\]\w "
|
||||||
{{ if lookPath "git" -}}
|
#{{ if lookPath "git" -}}
|
||||||
RET="$RET\[$bblack\]"'$(_parse_git_branch)'
|
RET="$RET\[$bblack\]"'$(_parse_git_branch)'
|
||||||
RET="$RET\[$yellow\]"'$(_parse_git_status) '
|
RET="$RET\[$yellow\]"'$(_parse_git_status) '
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
# display date
|
# display date
|
||||||
RET="$RET\[$purple\]\D{%F %I:%M%P} "
|
RET="$RET\[$purple\]\D{%F %I:%M%P} "
|
||||||
@ -37,8 +39,5 @@ _create_prompt() (
|
|||||||
echo "$RET"
|
echo "$RET"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
PS1=$(_create_prompt)
|
PS1=$(_create_prompt)
|
||||||
|
#{{- end }}
|
||||||
# vim: ft=bash
|
|
||||||
{{- end }}
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
{{ if lookPath "helm" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#{{ if lookPath "helm" -}}
|
||||||
eval "$(helm completion fish)"
|
eval "$(helm completion fish)"
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
{{ if lookPath "erd" -}}
|
#{{ if lookPath "erd" -}}
|
||||||
eval "$(erd --completions fish)"
|
eval "$(erd --completions fish)"
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
{{ if lookPath "git" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
# chezmoi:template:right-delimiter=}}#
|
||||||
|
#{{- /* vim: filetype=gitconfig */ -}}#
|
||||||
|
#{{ if lookPath "git" -}}#
|
||||||
[core]
|
[core]
|
||||||
editor = vim
|
editor = vim
|
||||||
excludesfile = {{ .chezmoi.homeDir }}/.config/git/ignore
|
excludesfile = #{{ .chezmoi.homeDir }}#/.config/git/ignore
|
||||||
quotepath = false
|
quotepath = false
|
||||||
commitGraph = true
|
commitGraph = true
|
||||||
|
|
||||||
@ -72,16 +75,14 @@
|
|||||||
[url "ssh://git@git.xbudex.com:2022"]
|
[url "ssh://git@git.xbudex.com:2022"]
|
||||||
insteadOf = https://git.xbudex.com
|
insteadOf = https://git.xbudex.com
|
||||||
|
|
||||||
{{ if .hellotech -}}
|
#{{ if .hellotech -}}#
|
||||||
[url "git@github.com:HelloTech"]
|
[url "git@github.com:HelloTech"]
|
||||||
insteadOf = https://github.com/HelloTech
|
insteadOf = https://github.com/HelloTech
|
||||||
email = buddy@hellotech.com
|
email = buddy@hellotech.com
|
||||||
|
|
||||||
{{ if lookPath "node" -}}
|
#{{ if lookPath "node" -}}#
|
||||||
[init]
|
[init]
|
||||||
templateDir = {{ .chezmoi.homeDir }}/.config/git/template
|
templateDir = #{{ .chezmoi.homeDir }}#/.config/git/template
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
|
#{{- end }}#
|
||||||
# vim: filetype=gitconfig
|
|
||||||
{{- end }}
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "git" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=conf */ -}}
|
||||||
|
#{{ if lookPath "git" -}}
|
||||||
################################################################################
|
################################################################################
|
||||||
## This global gitignore file is assembled based the github gitignore project:
|
## This global gitignore file is assembled based the github gitignore project:
|
||||||
## https://github.com/github/gitignore
|
## https://github.com/github/gitignore
|
||||||
@ -33,4 +35,4 @@ Desktop.ini
|
|||||||
|
|
||||||
# Compass/sass ignores
|
# Compass/sass ignores
|
||||||
.sass-cache
|
.sass-cache
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
{{ if and .hellotech (lookPath "node") -}}
|
// chezmoi:template:left-delimiter="/*{{"
|
||||||
|
// chezmoi:template:right-delimiter="}}*/"
|
||||||
|
/*{{- /* vim: filetype=javascript */ -}}*/
|
||||||
|
/*{{ if and .hellotech (lookPath "node") -}}*/
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
// vim: ft=javascript
|
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const childProcess = require("child_process");
|
const childProcess = require("child_process");
|
||||||
@ -50,4 +52,4 @@ main().catch(err => {
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
{{- end }}
|
/*{{- end }}*/
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "i3" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=i3config */ -}}
|
||||||
|
#{{ if lookPath "i3" -}}
|
||||||
# This file has been auto-generated by i3-config-wizard(1).
|
# This file has been auto-generated by i3-config-wizard(1).
|
||||||
# It will not be overwritten, so edit it as you like.
|
# It will not be overwritten, so edit it as you like.
|
||||||
#
|
#
|
||||||
@ -153,4 +155,4 @@ bindsym $mod+Control+l resize grow width 1 px or 1 ppt
|
|||||||
bar {
|
bar {
|
||||||
status_command i3status
|
status_command i3status
|
||||||
}
|
}
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "i3status" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=i3config */ -}}
|
||||||
|
#{{ if lookPath "i3status" -}}
|
||||||
# i3status configuration file.
|
# i3status configuration file.
|
||||||
# see "man i3status" for documentation.
|
# see "man i3status" for documentation.
|
||||||
|
|
||||||
@ -53,4 +55,4 @@ volume master {
|
|||||||
mixer = "Master"
|
mixer = "Master"
|
||||||
mixer_idx = 0
|
mixer_idx = 0
|
||||||
}
|
}
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
{{ if lookPath "lf" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
# chezmoi:template:right-delimiter=}}#
|
||||||
|
#{{- /* vim: filetype=conf */ -}}#
|
||||||
|
#{{ if lookPath "lf" -}}#
|
||||||
set drawbox true
|
set drawbox true
|
||||||
set hidden true
|
set hidden true
|
||||||
set icons true
|
set icons true
|
||||||
@ -24,11 +27,11 @@ map , # find-prev (default ',')
|
|||||||
|
|
||||||
map o open
|
map o open
|
||||||
|
|
||||||
cmd open ${{ "{{" }}
|
cmd open ${{
|
||||||
case $(file --mime-type "$f" --brief --dereference) in
|
case $(file --mime-type "$f" --brief --dereference) in
|
||||||
text/*|application/json) $EDITOR "$f";;
|
text/*|application/json) $EDITOR "$f";;
|
||||||
video/*|image/*|application/pdf) xdg-open "$f";;
|
video/*|image/*|application/pdf) xdg-open "$f";;
|
||||||
*) xdg-open "$f";;
|
*) xdg-open "$f";;
|
||||||
esac
|
esac
|
||||||
{{ "}}" }}
|
}}
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
# chezmoi:template:right-delimiter=}}#
|
||||||
|
#{{- /* vim: filetype=sh */ -}}#
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
BROWSER=firefox
|
BROWSER=firefox
|
||||||
HISTCONTROL=ignoredups:erasedups:ignorespace
|
HISTCONTROL=ignoredups:erasedups:ignorespace
|
||||||
@ -6,39 +9,37 @@ HISTSIZE=
|
|||||||
MAN_DIR=${XDG_DATA_HOME}/man/man1
|
MAN_DIR=${XDG_DATA_HOME}/man/man1
|
||||||
PATH=${XDG_BIN_HOME}:${PATH}
|
PATH=${XDG_BIN_HOME}:${PATH}
|
||||||
|
|
||||||
{{- if lookPath "nvim" }}
|
#{{- if lookPath "nvim" }}#
|
||||||
EDITOR=nvim
|
EDITOR=nvim
|
||||||
{{- else }}
|
#{{- else }}#
|
||||||
EDITOR=vim
|
EDITOR=vim
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
|
|
||||||
{{ if lookPath "bat" -}}
|
#{{ if lookPath "bat" -}}#
|
||||||
BAT_PAGER=never
|
BAT_PAGER=never
|
||||||
BAT_STYLE=plain
|
BAT_STYLE=plain
|
||||||
BAT_THEME=zenburn
|
BAT_THEME=zenburn
|
||||||
MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
{{ end -}}
|
#{{ end -}}#
|
||||||
|
|
||||||
{{ if eq .chezmoi.os "darwin" -}}
|
#{{ if eq .chezmoi.os "darwin" -}}#
|
||||||
CLICOLOR=1
|
CLICOLOR=1
|
||||||
{{ end -}}
|
#{{ end -}}#
|
||||||
|
|
||||||
{{ if .hellotech -}}
|
#{{ if .hellotech -}}#
|
||||||
GOPRIVATE=github.com/HelloTech
|
GOPRIVATE=github.com/HelloTech
|
||||||
PULUMI_SKIP_UPDATE_CHECK=true
|
PULUMI_SKIP_UPDATE_CHECK=true
|
||||||
{{ end -}}
|
#{{ end -}}#
|
||||||
|
|
||||||
{{ if and (lookPath "node") (stat (joinPath .chezmoi.homeDir ".config" "npm" "npmrc")) -}}
|
#{{ if and (lookPath "node") (stat (joinPath .chezmoi.homeDir ".config" "npm" "npmrc")) -}}#
|
||||||
NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc"
|
NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc"
|
||||||
{{ end -}}
|
#{{ end -}}#
|
||||||
|
|
||||||
{{ if lookPath "rg" -}}
|
#{{ if lookPath "rg" -}}#
|
||||||
RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME}/ripgrep/config"
|
RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME}/ripgrep/config"
|
||||||
{{ end -}}
|
#{{ end -}}#
|
||||||
|
|
||||||
{{ if or (lookPath "vim") (lookPath "nvim") -}}
|
#{{ if or (lookPath "vim") (lookPath "nvim") -}}#
|
||||||
VIMINIT='source $XDG_CONFIG_HOME/vim/vimrc'
|
VIMINIT='source $XDG_CONFIG_HOME/vim/vimrc'
|
||||||
MYVIMRC='$XDG_CONFIG_HOME/vim/vimrc'
|
MYVIMRC='$XDG_CONFIG_HOME/vim/vimrc'
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
|
|
||||||
# vim: filetype=sh
|
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=sh -*/ -}}
|
||||||
alias ll='ls -alF'
|
alias ll='ls -alF'
|
||||||
alias curl='curl --proto-default https --silent '
|
alias curl='curl --proto-default https --silent '
|
||||||
alias to_lower="tr '[:upper:]' '[:lower:]'"
|
alias to_lower="tr '[:upper:]' '[:lower:]'"
|
||||||
alias to_upper="tr '[:lower:]' '[:upper:]'"
|
alias to_upper="tr '[:lower:]' '[:upper:]'"
|
||||||
|
|
||||||
{{ if lookPath "nvim" -}}
|
#{{ if lookPath "nvim" -}}
|
||||||
alias vim=nvim
|
alias vim=nvim
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
alias node_lts="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep -v '-' | head -n 2 | tail -n 1 | cut -f 1"
|
alias node_lts="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep -v '-' | head -n 2 | tail -n 1 | cut -f 1"
|
||||||
alias node_current="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep '-' | head -n 1 | cut -f 1"
|
alias node_current="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep '-' | head -n 1 | cut -f 1"
|
||||||
@ -19,20 +21,18 @@ alias wget-opendir='wget --recursive --level 0 --continue --no-clobber \
|
|||||||
alias numfiles='find . -maxdepth 1 -type f | wc -l'
|
alias numfiles='find . -maxdepth 1 -type f | wc -l'
|
||||||
alias take='sudo chown $(whoami):$(whoami) '
|
alias take='sudo chown $(whoami):$(whoami) '
|
||||||
|
|
||||||
{{ if and (lookPath "jq") (lookPath "prettier") (lookPath "bat") -}}
|
#{{ if and (lookPath "jq") (lookPath "prettier") (lookPath "bat") -}}
|
||||||
alias pretty_json='jq --compact-output | prettier --parser json | bat --language json'
|
alias pretty_json='jq --compact-output | prettier --parser json | bat --language json'
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
{{ if eq .chezmoi.os "linux" -}}
|
#{{ if eq .chezmoi.os "linux" -}}
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias fgrep='fgrep --color=auto'
|
alias fgrep='fgrep --color=auto'
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep='egrep --color=auto'
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
{{ if lookPath "bat" -}}
|
#{{ if lookPath "bat" -}}
|
||||||
alias batdiff='batdiff --pager=""'
|
alias batdiff='batdiff --pager=""'
|
||||||
alias cat=bat
|
alias cat=bat
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
# vim: filetype=sh
|
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
{{ if lookPath "go" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
{{ if stat "/usr/local/apps/golang/current/bin" -}}
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#{{- if lookPath "go" -}}
|
||||||
|
#{{ if stat "/usr/local/apps/golang/current/bin" -}}
|
||||||
if [ -d /usr/local/apps/golang/current/bin ] && ! echo "${PATH}" | grep -q /usr/local/apps/golang/current/bin ; then
|
if [ -d /usr/local/apps/golang/current/bin ] && ! echo "${PATH}" | grep -q /usr/local/apps/golang/current/bin ; then
|
||||||
PATH="/usr/local/apps/golang/current/bin:${PATH}"
|
PATH="/usr/local/apps/golang/current/bin:${PATH}"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
if [ -d "${HOME}/go/bin" ] && ! echo "$PATH" | grep -q "${HOME}/go/bin" ; then
|
if [ -d "${HOME}/go/bin" ] && ! echo "$PATH" | grep -q "${HOME}/go/bin" ; then
|
||||||
PATH="${PATH}:${HOME}/go/bin"
|
PATH="${PATH}:${HOME}/go/bin"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if .hellotech -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#{{- if .hellotech -}}
|
||||||
|
|
||||||
k8s_last_config () (
|
k8s_last_config () (
|
||||||
dasel --read yaml --write json \
|
dasel --read yaml --write json \
|
||||||
@ -22,6 +24,4 @@ _add_path "/usr/local/opt/mysql-client/bin"
|
|||||||
_add_path "${HOME}/google-cloud-sdk/bin"
|
_add_path "${HOME}/google-cloud-sdk/bin"
|
||||||
|
|
||||||
unset _add_path
|
unset _add_path
|
||||||
|
#{{- end }}
|
||||||
# vim: filetype=sh
|
|
||||||
{{- end }}
|
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
{{ if lookPath "rbenv" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#{{- if lookPath "rbenv" -}}
|
||||||
# shellcheck shell=sh
|
# shellcheck shell=sh
|
||||||
|
|
||||||
if [ "${RBENV_SHELL}" = "" ]; then
|
if [ "${RBENV_SHELL}" = "" ]; then
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
{{ if lookPath "rvm" -}}
|
#{{ if lookPath "rvm" -}}
|
||||||
if [ -d "${HOME}/.rvm/bin" ]; then
|
if [ -d "${HOME}/.rvm/bin" ]; then
|
||||||
case "${PATH}" in
|
case "${PATH}" in
|
||||||
*"$HOME/.rvm/bin"*) ;;
|
*"$HOME/.rvm/bin"*) ;;
|
||||||
@ -21,4 +23,4 @@ if [ "$(ps -p $$ -ocomm=)" = sh ]; then
|
|||||||
. "$HOME/.rvm/scripts/rvm"
|
. "$HOME/.rvm/scripts/rvm"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{{ if lookPath "cargo" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
#!/usr/bin/env bash
|
#{{- /* vim: filetype=sh */ -}}
|
||||||
|
#{{- if lookPath "cargo" -}}
|
||||||
if [ -f "${HOME}/.cargo/env" ]; then
|
if [ -f "${HOME}/.cargo/env" ]; then
|
||||||
. "${HOME}/.cargo/env"
|
. "${HOME}/.cargo/env"
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "starship" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=toml */ -}}
|
||||||
|
#{{- if lookPath "starship" -}}
|
||||||
# Get editor completions based on the config schema
|
# Get editor completions based on the config schema
|
||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
@ -63,4 +65,4 @@ format = "[$duration]($style) "
|
|||||||
[character]
|
[character]
|
||||||
success_symbol = "λ"
|
success_symbol = "λ"
|
||||||
error_symbol = "[☠](red)"
|
error_symbol = "[☠](red)"
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
{{ if lookPath "podman" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
# chezmoi:template:right-delimiter=}}#
|
||||||
|
#{{- /* vim: filetype=systemd */ -}}#
|
||||||
|
#{{- if lookPath "podman" -}}#
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Podman service
|
Description=Podman service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart={{ lookPath "podman" }} system service --time 0
|
ExecStart=#{{ lookPath "podman" }}# system service --time 0
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
{{- end }}
|
#{{- end }}#
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if and (lookPath "tmux") (eq .chezmoi.os "darwin") -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=bash */ -}}
|
||||||
|
#{{- if and (lookPath "tmux") (eq .chezmoi.os "darwin") -}}
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$(uname -s)" == "Darwin" ]; then
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
@ -7,4 +9,4 @@ fi
|
|||||||
|
|
||||||
tmux set default-terminal "tmux-256color"
|
tmux set default-terminal "tmux-256color"
|
||||||
tmux set terminal-overrides ",xterm-256color:Tc"
|
tmux set terminal-overrides ",xterm-256color:Tc"
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "tmux" -}}
|
# chezmoi:template:left-delimiter="# {{"
|
||||||
|
# {{- /* vim: filetype=tmux */ -}}
|
||||||
|
# {{- if lookPath "tmux" -}}
|
||||||
################################################################################
|
################################################################################
|
||||||
# Base configuration
|
# Base configuration
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -33,9 +35,9 @@ set-option -g mouse on
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Colors
|
# Colors
|
||||||
################################################################################
|
################################################################################
|
||||||
{{ if eq .chezmoi.os "darwin" -}}
|
# {{ if eq .chezmoi.os "darwin" -}}
|
||||||
run $XDG_CONFIG_HOME/tmux/plugins/macos-color-workaround
|
run $XDG_CONFIG_HOME/tmux/plugins/macos-color-workaround
|
||||||
{{ end }}
|
# {{ end }}
|
||||||
set -g status-fg white
|
set -g status-fg white
|
||||||
set -g status-bg black
|
set -g status-bg black
|
||||||
|
|
||||||
@ -88,4 +90,4 @@ set -g @prefix_highlight_show_sync_mode 'on'
|
|||||||
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow'
|
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow'
|
||||||
|
|
||||||
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm
|
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm
|
||||||
{{- end }}
|
# {{- end }}
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: ft=sh */ -}}
|
||||||
|
#{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}}
|
||||||
# If you want to change or add directories, just edit the line you're
|
# If you want to change or add directories, just edit the line you're
|
||||||
# interested in. All local changes will be retained on the next run.
|
# interested in. All local changes will be retained on the next run.
|
||||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
# absolute path. No other format is supported.
|
# absolute path. No other format is supported.
|
||||||
|
|
||||||
{{ if eq .chezmoi.os "linux" -}}
|
#{{ if eq .chezmoi.os "linux" -}}
|
||||||
XDG_DESKTOP_DIR=$HOME/desktop
|
XDG_DESKTOP_DIR=$HOME/desktop
|
||||||
XDG_DOCUMENTS_DIR=$HOME/documents
|
XDG_DOCUMENTS_DIR=$HOME/documents
|
||||||
XDG_DOWNLOAD_DIR=$HOME/downloads
|
XDG_DOWNLOAD_DIR=$HOME/downloads
|
||||||
@ -15,7 +17,7 @@ XDG_PODCAST_DIR=$HOME/podcasts
|
|||||||
XDG_PUBLICSHARE_DIR=$HOME/public
|
XDG_PUBLICSHARE_DIR=$HOME/public
|
||||||
XDG_TEMPLATES_DIR=$HOME/templates
|
XDG_TEMPLATES_DIR=$HOME/templates
|
||||||
XDG_VIDEOS_DIR=$HOME/videos
|
XDG_VIDEOS_DIR=$HOME/videos
|
||||||
{{- else if eq .chezmoi.os "darwin" -}}
|
#{{- else if eq .chezmoi.os "darwin" -}}
|
||||||
XDG_DESKTOP_DIR=$HOME/Desktop
|
XDG_DESKTOP_DIR=$HOME/Desktop
|
||||||
XDG_DOCUMENTS_DIR=$HOME/Documents
|
XDG_DOCUMENTS_DIR=$HOME/Documents
|
||||||
XDG_DOWNLOAD_DIR=$HOME/Downloads
|
XDG_DOWNLOAD_DIR=$HOME/Downloads
|
||||||
@ -25,5 +27,5 @@ XDG_PODCAST_DIR=$HOME/Podcasts
|
|||||||
XDG_PUBLICSHARE_DIR=$HOME/Public
|
XDG_PUBLICSHARE_DIR=$HOME/Public
|
||||||
XDG_TEMPLATES_DIR=$HOME/Templates
|
XDG_TEMPLATES_DIR=$HOME/Templates
|
||||||
XDG_VIDEOS_DIR=$HOME/Movies
|
XDG_VIDEOS_DIR=$HOME/Movies
|
||||||
{{- end -}}
|
#{{- end }}
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
{{ if lookPath "go" -}}
|
# chezmoi:template:left-delimiter="{{
|
||||||
|
"{{- /* vim: filetype=vim */ -}}
|
||||||
|
"{{- if lookPath "go" -}}
|
||||||
set noexpandtab
|
set noexpandtab
|
||||||
|
|
||||||
{{ if lookPath "goimports" -}}
|
"{{ if lookPath "goimports" -}}
|
||||||
" use goimports for formatting
|
" use goimports for formatting
|
||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
{{- end }}
|
"{{- end }}
|
||||||
|
|
||||||
" turn highlighting on
|
" turn highlighting on
|
||||||
let g:go_highlight_functions = 1
|
let g:go_highlight_functions = 1
|
||||||
@ -16,6 +18,4 @@ let g:go_highlight_build_constraints = 1
|
|||||||
" Open go doc in vertical window, horizontal, or tab
|
" Open go doc in vertical window, horizontal, or tab
|
||||||
nnoremap <leader>d :GoDef<CR>
|
nnoremap <leader>d :GoDef<CR>
|
||||||
nnoremap <leader>t :GoDefType<CR>
|
nnoremap <leader>t :GoDefType<CR>
|
||||||
|
"{{- end }}
|
||||||
" vim: filetype=vim
|
|
||||||
{{- end }}
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
{{ if lookPath "rustc" -}}
|
" chezmoi:template:left-delimiter="{{
|
||||||
|
"{{- /* vim: filetype=vim */ -}}
|
||||||
|
"{{- if lookPath "rustc" -}}
|
||||||
let g:rustfmt_autosave = 1
|
let g:rustfmt_autosave = 1
|
||||||
{{- end }}
|
"{{- end }}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
{{ if lookPath "fzf" -}}
|
" chezmoi:template:left-delimiter="{{
|
||||||
|
"{{- /* vim: filetype=vim */ -}}
|
||||||
|
"{{- if lookPath "fzf" -}}
|
||||||
Plug 'junegunn/fzf', { 'tag': '0.40.0' }
|
Plug 'junegunn/fzf', { 'tag': '0.40.0' }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
map <leader>fz :GFiles<CR>
|
map <leader>fz :GFiles<CR>
|
||||||
map <leader>rg :Rg<CR>
|
map <leader>rg :Rg<CR>
|
||||||
{{- end }}
|
"{{- end }}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
{{ if lookPath "go" -}}
|
" chezmoi:template:left-delimiter="{{
|
||||||
|
"{{- /* vim: filetype=vim */ -}}
|
||||||
|
"{{- if lookPath "go" -}}
|
||||||
Plug 'fatih/vim-go'
|
Plug 'fatih/vim-go'
|
||||||
{{- end }}
|
"{{- end }}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
{{ if lookPath "rustc" -}}
|
" chezmoi:template:left-delimiter="{{
|
||||||
|
"{{- /* vim: filetype=vim */ -}}
|
||||||
|
"{{- if lookPath "rustc" -}}
|
||||||
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
||||||
{{- end }}
|
"{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "go" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=snippets */ -}}
|
||||||
|
#{{- if lookPath "go" -}}
|
||||||
snippet ignore "ignore function" !
|
snippet ignore "ignore function" !
|
||||||
func(...any) {}(${1})
|
func(...any) {}(${1})
|
||||||
endsnippet
|
endsnippet
|
||||||
@ -44,4 +46,4 @@ func Test${1}(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=zsh */ -}}
|
||||||
setopt autocd
|
setopt autocd
|
||||||
setopt autopushd
|
setopt autopushd
|
||||||
setopt pushdignoredups
|
setopt pushdignoredups
|
||||||
@ -30,59 +32,57 @@ zstyle ':completion:*' verbose true
|
|||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
{{ if and (lookPath "dircolors") (eq .chezmoi.os "linux") -}}
|
#{{ if and (lookPath "dircolors") (eq .chezmoi.os "linux") -}}
|
||||||
eval "$(dircolors -b)"
|
eval "$(dircolors -b)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "bat" -}}
|
#{{- if lookPath "bat" -}}
|
||||||
alias cat=bat
|
alias cat=bat
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "direnv" -}}
|
#{{- if lookPath "direnv" -}}
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "erd" -}}
|
#{{- if lookPath "erd" -}}
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
eval "$(erd --completions zsh)"
|
eval "$(erd --completions zsh)"
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "helm" -}}
|
#{{- if lookPath "helm" -}}
|
||||||
# shellcheck disable=SC2148,SC1090
|
# shellcheck disable=SC2148,SC1090
|
||||||
autoload -U +X compinit && compinit
|
autoload -U +X compinit && compinit
|
||||||
source <(helm completion zsh)
|
source <(helm completion zsh)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "kubectl" -}}
|
#{{- if lookPath "kubectl" -}}
|
||||||
# shellcheck disable=SC2148,SC1090
|
# shellcheck disable=SC2148,SC1090
|
||||||
autoload -U +X compinit && compinit
|
autoload -U +X compinit && compinit
|
||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "rbenv" -}}
|
#{{- if lookPath "rbenv" -}}
|
||||||
if [ "${RBENV_SHELL}" = "" ]; then
|
if [ "${RBENV_SHELL}" = "" ]; then
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "rvm" }}
|
#{{- if lookPath "rvm" }}
|
||||||
if [[ -d "${HOME}/.rvm/bin" ]]; then
|
if [[ -d "${HOME}/.rvm/bin" ]]; then
|
||||||
if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then
|
if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then
|
||||||
export PATH="$PATH:$HOME/.rvm/bin"
|
export PATH="$PATH:$HOME/.rvm/bin"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "starship" -}}
|
#{{- if lookPath "starship" -}}
|
||||||
source <(starship init zsh)
|
source <(starship init zsh)
|
||||||
{{ end -}}
|
#{{ end -}}
|
||||||
|
|
||||||
{{- if lookPath "tmux" }}
|
#{{- if lookPath "tmux" }}
|
||||||
if [ "$TMUX" ]; then
|
if [ "$TMUX" ]; then
|
||||||
# TERM=tmux-256color does not work as expected on osx
|
# TERM=tmux-256color does not work as expected on osx
|
||||||
export TERM=screen-256color
|
export TERM=screen-256color
|
||||||
fi
|
fi
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|
||||||
# vim: filetype=zsh
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "jq" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=jq */ -}}
|
||||||
|
#{{- if lookPath "jq" -}}
|
||||||
def reset: "\u001b[0m";
|
def reset: "\u001b[0m";
|
||||||
def black: "\u001b[30m";
|
def black: "\u001b[30m";
|
||||||
def white: "\u001b[97m";
|
def white: "\u001b[97m";
|
||||||
@ -8,4 +10,4 @@ def green: "\u001b[32m";
|
|||||||
def yellow: "\u001b[33m";
|
def yellow: "\u001b[33m";
|
||||||
def red: "\u001b[31m";
|
def red: "\u001b[31m";
|
||||||
def magenta: "\u001b[35m";
|
def magenta: "\u001b[35m";
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "jq" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=jq */ -}}
|
||||||
|
#{{- if lookPath "jq" -}}
|
||||||
def browser: env.BROWSER;
|
def browser: env.BROWSER;
|
||||||
def editor: env.EDITOR;
|
def editor: env.EDITOR;
|
||||||
def home: env.HOME;
|
def home: env.HOME;
|
||||||
@ -13,4 +15,4 @@ def config: env.XDG_CONFIG_HOME;
|
|||||||
def data: env.XDG_DATA_HOME;
|
def data: env.XDG_DATA_HOME;
|
||||||
def runtime: env.XDG_RUNTIME_DIR;
|
def runtime: env.XDG_RUNTIME_DIR;
|
||||||
def state: env.XDG_STATE_HOME;
|
def state: env.XDG_STATE_HOME;
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if lookPath "jq" -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=jq */ -}}
|
||||||
|
#{{- if lookPath "jq" -}}
|
||||||
def by_time: sort_by(.created_at) | reverse;
|
def by_time: sort_by(.created_at) | reverse;
|
||||||
|
|
||||||
def asset($os; $arch):
|
def asset($os; $arch):
|
||||||
@ -26,4 +28,4 @@ assets
|
|||||||
] | join("\n")
|
] | join("\n")
|
||||||
)
|
)
|
||||||
";
|
";
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{{ if and .hellotech (lookPath "jq") -}}
|
# chezmoi:template:left-delimiter=#{{
|
||||||
|
#{{- /* vim: filetype=jq */ -}}
|
||||||
|
#{{- if and .hellotech (lookPath "jq") -}}
|
||||||
import "colors" as colors;
|
import "colors" as colors;
|
||||||
|
|
||||||
def clean_multierror:
|
def clean_multierror:
|
||||||
@ -76,4 +78,4 @@ def show:
|
|||||||
"\n" + colors::red + "ERROR" + colors::reset + ": " + _show_error
|
"\n" + colors::red + "ERROR" + colors::reset + ": " + _show_error
|
||||||
else "" end
|
else "" end
|
||||||
) + colors::reset;
|
) + colors::reset;
|
||||||
{{- end }}
|
#{{- end }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user