From def01bdb0101aac6c1005f1116c83331b5d3954d Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Mon, 29 May 2023 16:19:59 -0700 Subject: [PATCH] Fix syntax for setting vim filetype in templates --- dot_bash_profile | 3 +-- dot_bashrc.tmpl | 5 +++-- dot_config/bash/bashrc.d/base.sh.tmpl | 2 +- dot_config/bash/bashrc.d/completion.sh.tmpl | 2 +- dot_config/bash/env.d/base.env.tmpl | 2 +- dot_config/bash/prompt.sh.tmpl | 2 +- dot_config/fish/completions/completions.fish.tmpl | 2 +- dot_config/git/config.tmpl | 2 +- dot_config/git/ignore.tmpl | 2 +- .../hooks/executable_prepare-commit-msg.tmpl | 2 +- dot_config/i3/config.tmpl | 2 +- dot_config/i3status/config.tmpl | 2 +- dot_config/ideavim/{ideavimrc => ideavimrc.tmpl} | 4 ++++ dot_config/lf/lfrc.tmpl | 2 +- dot_config/profile/env.d/base.env.tmpl | 2 +- dot_config/profile/profile.d/alias.sh.tmpl | 2 +- dot_config/profile/profile.d/base.sh.tmpl | 2 +- dot_config/profile/profile.d/hellotech.sh.tmpl | 2 +- dot_config/starship.toml.tmpl | 2 +- dot_config/systemd/user/podman.service.tmpl | 2 +- .../plugins/executable_macos-color-workaround.tmpl | 2 +- dot_config/tmux/tmux.conf.tmpl | 2 +- dot_config/user-dirs.dirs.tmpl | 2 +- dot_config/vim/ftplugin/go.vim.tmpl | 2 +- dot_config/vim/ftplugin/rust.vim.tmpl | 2 +- dot_config/vim/plug.d/fzf.vim.tmpl | 2 +- dot_config/vim/plug.d/go.vim.tmpl | 2 +- dot_config/vim/plug.d/rust.vim.tmpl | 2 +- dot_config/vim/snips/go.snippets.tmpl | 2 +- dot_config/zsh/zshrc.d/base.zsh.tmpl | 2 +- dot_jq/colors.jq.tmpl | 2 +- dot_jq/env.jq.tmpl | 2 +- dot_jq/github.jq.tmpl | 2 +- dot_jq/ht.jq.tmpl | 2 +- dot_local/bin/executable_duck-encoder.tmpl | 8 ++++---- dot_local/bin/executable_filesize.tmpl | 6 ++++-- dot_local/bin/executable_get-amazon-art.tmpl | 7 ++++--- dot_local/bin/executable_mkpodcastplaylist.tmpl | 6 ++++-- dot_local/bin/executable_mv-to-docs.tmpl | 6 ++++-- dot_local/bin/executable_prefix-date.tmpl | 6 ++++-- dot_local/bin/executable_send-toy-certs.tmpl | 6 ++++-- dot_local/bin/executable_snow.tmpl | 6 ++++-- dot_profile.tmpl | 14 ++++++++------ dot_zshrc | 2 ++ 44 files changed, 81 insertions(+), 60 deletions(-) rename dot_config/ideavim/{ideavimrc => ideavimrc.tmpl} (96%) diff --git a/dot_bash_profile b/dot_bash_profile index 716afd1..6ecd981 100644 --- a/dot_bash_profile +++ b/dot_bash_profile @@ -1,2 +1 @@ -. "${HOME}/.bashrc" -# vim: filetype=bash +source "${HOME}/.bashrc" diff --git a/dot_bashrc.tmpl b/dot_bashrc.tmpl index 6e6bd79..e0dcca1 100644 --- a/dot_bashrc.tmpl +++ b/dot_bashrc.tmpl @@ -1,6 +1,6 @@ -#!/usr/bin/env bash # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=bash */}} +#{{- /* vim: set filetype=bash: */ -}} +#!/usr/bin/env bash source "${HOME}/.profile" @@ -21,6 +21,7 @@ if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then source "$file" fi done + unset file fi if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then diff --git a/dot_config/bash/bashrc.d/base.sh.tmpl b/dot_config/bash/bashrc.d/base.sh.tmpl index 64c877e..dacd4e8 100644 --- a/dot_config/bash/bashrc.d/base.sh.tmpl +++ b/dot_config/bash/bashrc.d/base.sh.tmpl @@ -1,5 +1,5 @@ #chezmoi:template:left-delimiter=#{{ -#{{- /*- vim: filetype=bash */ -}} +#{{- /* vim: set filetype=bash: */ -}} if [[ ${BASH_VERSION} != "3.2*" ]]; then shopt -s autocd fi diff --git a/dot_config/bash/bashrc.d/completion.sh.tmpl b/dot_config/bash/bashrc.d/completion.sh.tmpl index 4d4b4fd..aae88d8 100644 --- a/dot_config/bash/bashrc.d/completion.sh.tmpl +++ b/dot_config/bash/bashrc.d/completion.sh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=bash */ -}} +#{{- /* vim: set filetype=bash: */ -}} #{{ if stat "/etc/bash_completion" -}} source /etc/bash_completion diff --git a/dot_config/bash/env.d/base.env.tmpl b/dot_config/bash/env.d/base.env.tmpl index 0ab4b50..b18df8c 100644 --- a/dot_config/bash/env.d/base.env.tmpl +++ b/dot_config/bash/env.d/base.env.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=sh */ -}} +#{{- /* vim: set filetype=bash: */ -}} #shellcheck disable=SC2034 HISTTIMEFORMAT='%y-%m-%d %T λ ' QUOTING_STYLE=literal diff --git a/dot_config/bash/prompt.sh.tmpl b/dot_config/bash/prompt.sh.tmpl index 64fa44c..86e6d00 100644 --- a/dot_config/bash/prompt.sh.tmpl +++ b/dot_config/bash/prompt.sh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=bash */ -}} +#{{- /* vim: set filetype=bash: */ -}} #{{ if not (lookPath "starship") -}} #{{ if lookPath "git" -}} diff --git a/dot_config/fish/completions/completions.fish.tmpl b/dot_config/fish/completions/completions.fish.tmpl index d69a0aa..3449fd7 100644 --- a/dot_config/fish/completions/completions.fish.tmpl +++ b/dot_config/fish/completions/completions.fish.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=sh */ -}} +#{{- /* vim: set filetype=sh: */ -}} #{{ if lookPath "helm" -}} eval "$(helm completion fish)" #{{- end }} diff --git a/dot_config/git/config.tmpl b/dot_config/git/config.tmpl index aa7f9ca..ee97d32 100644 --- a/dot_config/git/config.tmpl +++ b/dot_config/git/config.tmpl @@ -1,6 +1,6 @@ # chezmoi:template:left-delimiter=#{{ # chezmoi:template:right-delimiter=}}# -#{{- /* vim: filetype=gitconfig */ -}}# +#{{- /* vim: set filetype=gitconfig: */ -}}# #{{ if lookPath "git" -}}# [core] editor = vim diff --git a/dot_config/git/ignore.tmpl b/dot_config/git/ignore.tmpl index fd23fa8..e7eb84d 100644 --- a/dot_config/git/ignore.tmpl +++ b/dot_config/git/ignore.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=conf */ -}} +#{{- /* vim: set filetype=gitconfig: */ -}} #{{ if lookPath "git" -}} ################################################################################ ## This global gitignore file is assembled based the github gitignore project: diff --git a/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl b/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl index 0e1aeac..328a48b 100644 --- a/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl +++ b/dot_config/git/template/hooks/executable_prepare-commit-msg.tmpl @@ -1,6 +1,6 @@ // chezmoi:template:left-delimiter="/*{{" // chezmoi:template:right-delimiter="}}*/" -/*{{- /* vim: filetype=javascript */ -}}*/ +/*{{- /* vim: set filetype=javascript: */ -}}*/ /*{{ if and .hellotech (lookPath "node") -}}*/ #!/usr/bin/env node diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index de3fc36..450eafc 100644 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=i3config */ -}} +#{{- /* vim: set filetype=i3config: */ -}} #{{ if lookPath "i3" -}} # This file has been auto-generated by i3-config-wizard(1). # It will not be overwritten, so edit it as you like. diff --git a/dot_config/i3status/config.tmpl b/dot_config/i3status/config.tmpl index 7378a1c..78fde6b 100644 --- a/dot_config/i3status/config.tmpl +++ b/dot_config/i3status/config.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=i3config */ -}} +#{{- /* vim: set filetype=i3config: */ -}} #{{ if lookPath "i3status" -}} # i3status configuration file. # see "man i3status" for documentation. diff --git a/dot_config/ideavim/ideavimrc b/dot_config/ideavim/ideavimrc.tmpl similarity index 96% rename from dot_config/ideavim/ideavimrc rename to dot_config/ideavim/ideavimrc.tmpl index a5c0271..bf41872 100644 --- a/dot_config/ideavim/ideavimrc +++ b/dot_config/ideavim/ideavimrc.tmpl @@ -1,3 +1,6 @@ +# chezmoi:template:left-delimiter="{{ +"{{- /* vim: set filetype=vim: */ -}} +"{{ if .development -}} set visualbell set noerrorbells set relativenumber @@ -159,3 +162,4 @@ set noerrorbells set novisualbell set t_vb= set timeoutlen=500 +"{{- end }} diff --git a/dot_config/lf/lfrc.tmpl b/dot_config/lf/lfrc.tmpl index 24cba00..3d0e48c 100644 --- a/dot_config/lf/lfrc.tmpl +++ b/dot_config/lf/lfrc.tmpl @@ -1,6 +1,6 @@ # chezmoi:template:left-delimiter=#{{ # chezmoi:template:right-delimiter=}}# -#{{- /* vim: filetype=conf */ -}}# +#{{- /* vim: set filetype=conf: */ -}}# #{{ if lookPath "lf" -}}# set drawbox true set hidden true diff --git a/dot_config/profile/env.d/base.env.tmpl b/dot_config/profile/env.d/base.env.tmpl index e800c4e..5cc1173 100644 --- a/dot_config/profile/env.d/base.env.tmpl +++ b/dot_config/profile/env.d/base.env.tmpl @@ -1,6 +1,6 @@ # chezmoi:template:left-delimiter=#{{ # chezmoi:template:right-delimiter=}}# -#{{- /* vim: filetype=sh */ -}}# +#{{- /* vim: set filetype=sh: */ -}}# #shellcheck disable=SC2034 BROWSER=firefox HISTCONTROL=ignoredups:erasedups:ignorespace diff --git a/dot_config/profile/profile.d/alias.sh.tmpl b/dot_config/profile/profile.d/alias.sh.tmpl index 309d41b..b10d390 100644 --- a/dot_config/profile/profile.d/alias.sh.tmpl +++ b/dot_config/profile/profile.d/alias.sh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=sh */ -}} +#{{- /* vim: set filetype=sh: */ -}} alias ll='ls -alF' alias curl='curl --proto-default https --silent ' alias to_lower="tr '[:upper:]' '[:lower:]'" diff --git a/dot_config/profile/profile.d/base.sh.tmpl b/dot_config/profile/profile.d/base.sh.tmpl index 25df84d..81eaa01 100644 --- a/dot_config/profile/profile.d/base.sh.tmpl +++ b/dot_config/profile/profile.d/base.sh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=sh */ -}} +#{{- /* vim: set 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 diff --git a/dot_config/profile/profile.d/hellotech.sh.tmpl b/dot_config/profile/profile.d/hellotech.sh.tmpl index 9aad50d..b795822 100644 --- a/dot_config/profile/profile.d/hellotech.sh.tmpl +++ b/dot_config/profile/profile.d/hellotech.sh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=sh */ -}} +#{{- /* vim: set filetype=sh: */ -}} #{{- if .hellotech -}} k8s_last_config () ( diff --git a/dot_config/starship.toml.tmpl b/dot_config/starship.toml.tmpl index 3608bc7..1b74c36 100644 --- a/dot_config/starship.toml.tmpl +++ b/dot_config/starship.toml.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=toml */ -}} +#{{- /* vim: set filetype=toml: */ -}} #{{- if lookPath "starship" -}} # Get editor completions based on the config schema "$schema" = 'https://starship.rs/config-schema.json' diff --git a/dot_config/systemd/user/podman.service.tmpl b/dot_config/systemd/user/podman.service.tmpl index 1539e7d..0482b89 100644 --- a/dot_config/systemd/user/podman.service.tmpl +++ b/dot_config/systemd/user/podman.service.tmpl @@ -1,6 +1,6 @@ # chezmoi:template:left-delimiter=#{{ # chezmoi:template:right-delimiter=}}# -#{{- /* vim: filetype=systemd */ -}}# +#{{- /* vim: set filetype=systemd: */ -}}# #{{- if lookPath "podman" -}}# [Unit] Description=Podman service diff --git a/dot_config/tmux/plugins/executable_macos-color-workaround.tmpl b/dot_config/tmux/plugins/executable_macos-color-workaround.tmpl index 8909934..5774cc7 100644 --- a/dot_config/tmux/plugins/executable_macos-color-workaround.tmpl +++ b/dot_config/tmux/plugins/executable_macos-color-workaround.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=bash */ -}} +#{{- /* vim: set filetype=bash: */ -}} #{{- if and (lookPath "tmux") (eq .chezmoi.os "darwin") -}} #!/usr/bin/env bash diff --git a/dot_config/tmux/tmux.conf.tmpl b/dot_config/tmux/tmux.conf.tmpl index 417183b..cabeb83 100644 --- a/dot_config/tmux/tmux.conf.tmpl +++ b/dot_config/tmux/tmux.conf.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter="# {{" -# {{- /* vim: filetype=tmux */ -}} +# {{- /* vim: set filetype=tmux: */ -}} # {{- if lookPath "tmux" -}} ################################################################################ # Base configuration diff --git a/dot_config/user-dirs.dirs.tmpl b/dot_config/user-dirs.dirs.tmpl index 9bb46d6..5d9daac 100644 --- a/dot_config/user-dirs.dirs.tmpl +++ b/dot_config/user-dirs.dirs.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: ft=sh */ -}} +#{{- /* vim: set filetype=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 # interested in. All local changes will be retained on the next run. diff --git a/dot_config/vim/ftplugin/go.vim.tmpl b/dot_config/vim/ftplugin/go.vim.tmpl index 8c7ddd9..311e8f8 100644 --- a/dot_config/vim/ftplugin/go.vim.tmpl +++ b/dot_config/vim/ftplugin/go.vim.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter="{{ -"{{- /* vim: filetype=vim */ -}} +"{{- /* vim: set filetype=vim: */ -}} "{{- if lookPath "go" -}} set noexpandtab diff --git a/dot_config/vim/ftplugin/rust.vim.tmpl b/dot_config/vim/ftplugin/rust.vim.tmpl index 57eed93..f34f94c 100644 --- a/dot_config/vim/ftplugin/rust.vim.tmpl +++ b/dot_config/vim/ftplugin/rust.vim.tmpl @@ -1,5 +1,5 @@ " chezmoi:template:left-delimiter="{{ -"{{- /* vim: filetype=vim */ -}} +"{{- /* vim: set filetype=vim: */ -}} "{{- if lookPath "rustc" -}} let g:rustfmt_autosave = 1 "{{- end }} diff --git a/dot_config/vim/plug.d/fzf.vim.tmpl b/dot_config/vim/plug.d/fzf.vim.tmpl index 86a9b6e..3ea29d4 100644 --- a/dot_config/vim/plug.d/fzf.vim.tmpl +++ b/dot_config/vim/plug.d/fzf.vim.tmpl @@ -1,5 +1,5 @@ " chezmoi:template:left-delimiter="{{ -"{{- /* vim: filetype=vim */ -}} +"{{- /* vim: set filetype=vim: */ -}} "{{- if lookPath "fzf" -}} Plug 'junegunn/fzf', { 'tag': '0.40.0' } Plug 'junegunn/fzf.vim' diff --git a/dot_config/vim/plug.d/go.vim.tmpl b/dot_config/vim/plug.d/go.vim.tmpl index 500b7f6..c04e9c7 100644 --- a/dot_config/vim/plug.d/go.vim.tmpl +++ b/dot_config/vim/plug.d/go.vim.tmpl @@ -1,5 +1,5 @@ " chezmoi:template:left-delimiter="{{ -"{{- /* vim: filetype=vim */ -}} +"{{- /* vim: set filetype=vim: */ -}} "{{- if lookPath "go" -}} Plug 'fatih/vim-go' "{{- end }} diff --git a/dot_config/vim/plug.d/rust.vim.tmpl b/dot_config/vim/plug.d/rust.vim.tmpl index 7090333..85f0333 100644 --- a/dot_config/vim/plug.d/rust.vim.tmpl +++ b/dot_config/vim/plug.d/rust.vim.tmpl @@ -1,5 +1,5 @@ " chezmoi:template:left-delimiter="{{ -"{{- /* vim: filetype=vim */ -}} +"{{- /* vim: set filetype=vim: */ -}} "{{- if lookPath "rustc" -}} Plug 'rust-lang/rust.vim', { 'for': 'rust' } "{{- end }} diff --git a/dot_config/vim/snips/go.snippets.tmpl b/dot_config/vim/snips/go.snippets.tmpl index 516317e..b59cfc0 100644 --- a/dot_config/vim/snips/go.snippets.tmpl +++ b/dot_config/vim/snips/go.snippets.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=snippets */ -}} +#{{- /* vim: set filetype=snippets: */ -}} #{{- if lookPath "go" -}} snippet ignore "ignore function" ! func(...any) {}(${1}) diff --git a/dot_config/zsh/zshrc.d/base.zsh.tmpl b/dot_config/zsh/zshrc.d/base.zsh.tmpl index ddff6b7..21b0759 100644 --- a/dot_config/zsh/zshrc.d/base.zsh.tmpl +++ b/dot_config/zsh/zshrc.d/base.zsh.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=zsh */ -}} +#{{- /* vim: set filetype=zsh: */ -}} setopt autocd setopt autopushd setopt pushdignoredups diff --git a/dot_jq/colors.jq.tmpl b/dot_jq/colors.jq.tmpl index c162bb7..c527f96 100644 --- a/dot_jq/colors.jq.tmpl +++ b/dot_jq/colors.jq.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=jq */ -}} +#{{- /* vim: set filetype=jq: */ -}} #{{- if lookPath "jq" -}} def reset: "\u001b[0m"; def black: "\u001b[30m"; diff --git a/dot_jq/env.jq.tmpl b/dot_jq/env.jq.tmpl index 4737303..10ab4fc 100644 --- a/dot_jq/env.jq.tmpl +++ b/dot_jq/env.jq.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=jq */ -}} +#{{- /* vim: set filetype=jq: */ -}} #{{- if lookPath "jq" -}} def browser: env.BROWSER; def editor: env.EDITOR; diff --git a/dot_jq/github.jq.tmpl b/dot_jq/github.jq.tmpl index 9ed8694..066fd8c 100644 --- a/dot_jq/github.jq.tmpl +++ b/dot_jq/github.jq.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=jq */ -}} +#{{- /* vim: set filetype=jq: */ -}} #{{- if lookPath "jq" -}} def by_time: sort_by(.created_at) | reverse; diff --git a/dot_jq/ht.jq.tmpl b/dot_jq/ht.jq.tmpl index b697a61..1d3e60f 100644 --- a/dot_jq/ht.jq.tmpl +++ b/dot_jq/ht.jq.tmpl @@ -1,5 +1,5 @@ # chezmoi:template:left-delimiter=#{{ -#{{- /* vim: filetype=jq */ -}} +#{{- /* vim: set filetype=jq: */ -}} #{{- if and .hellotech (lookPath "jq") -}} import "colors" as colors; diff --git a/dot_local/bin/executable_duck-encoder.tmpl b/dot_local/bin/executable_duck-encoder.tmpl index 35b31c7..0e1a625 100755 --- a/dot_local/bin/executable_duck-encoder.tmpl +++ b/dot_local/bin/executable_duck-encoder.tmpl @@ -1,7 +1,7 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=bash: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env bash java -jar "$XDG_DATA_HOME/duck-encoder/duck-encoder.jar" $* - -# vim: ft=bash -{{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_filesize.tmpl b/dot_local/bin/executable_filesize.tmpl index 767f99b..c978e32 100755 --- a/dot_local/bin/executable_filesize.tmpl +++ b/dot_local/bin/executable_filesize.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=perl: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env perl # Get sorted list files @@ -14,4 +16,4 @@ foreach my $file (@sortedFiles) { my $fileSortedPrintCmd = "du -s \"$realFileName\""; print `$fileSortedPrintCmd`; } -{{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_get-amazon-art.tmpl b/dot_local/bin/executable_get-amazon-art.tmpl index 4c62e06..3108a16 100755 --- a/dot_local/bin/executable_get-amazon-art.tmpl +++ b/dot_local/bin/executable_get-amazon-art.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=python: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env python """ This is a program that attempts to get all the album art from amazon @@ -169,5 +171,4 @@ def main(): if __name__ == "__main__": main() - -{{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_mkpodcastplaylist.tmpl b/dot_local/bin/executable_mkpodcastplaylist.tmpl index bd213de..24b6785 100755 --- a/dot_local/bin/executable_mkpodcastplaylist.tmpl +++ b/dot_local/bin/executable_mkpodcastplaylist.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=python: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env python3 from functools import partial @@ -118,4 +120,4 @@ if __name__ == '__main__': parser.add_argument('-d', '--directory', default=Path('.'), type=Path) args = parser.parse_args() main(args.directory) - {{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_mv-to-docs.tmpl b/dot_local/bin/executable_mv-to-docs.tmpl index 5874cae..148a716 100755 --- a/dot_local/bin/executable_mv-to-docs.tmpl +++ b/dot_local/bin/executable_mv-to-docs.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=python: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env python3 ''' @@ -83,4 +85,4 @@ if __name__ == "__main__": message = "" main(file_name=file_name, dir_name=dir_name, message=message) - {{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_prefix-date.tmpl b/dot_local/bin/executable_prefix-date.tmpl index bab01d0..ea72efb 100755 --- a/dot_local/bin/executable_prefix-date.tmpl +++ b/dot_local/bin/executable_prefix-date.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=python: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env python3 import os @@ -116,4 +118,4 @@ if __name__ == '__main__': options, args = parser.parse_args() main(options, args) - {{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_send-toy-certs.tmpl b/dot_local/bin/executable_send-toy-certs.tmpl index a28007c..6419e72 100755 --- a/dot_local/bin/executable_send-toy-certs.tmpl +++ b/dot_local/bin/executable_send-toy-certs.tmpl @@ -1,6 +1,8 @@ -{{ if .include_legacy -}} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=bash: */ -}} +#{{ if .include_legacy -}} #!/usr/bin/env bash sudo systemctl start lego@toy.xbudex.com.service scp /etc/ssl/certificates/toy.xbudex.com.crt toy.xbudex.com:AppData/Local/Syncthing/https-cert.pem scp /etc/ssl/certificates/toy.xbudex.com.key toy.xbudex.com:AppData/Local/Syncthing/https-key.pem -{{- end }} +#{{- end }} diff --git a/dot_local/bin/executable_snow.tmpl b/dot_local/bin/executable_snow.tmpl index e2cb98a..7bbcb4c 100755 --- a/dot_local/bin/executable_snow.tmpl +++ b/dot_local/bin/executable_snow.tmpl @@ -1,4 +1,6 @@ -{{ if .include_legacy }} +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=bash: */ -}} +#{{ if .include_legacy -}} #!/bin/bash LINES=$(tput lines) @@ -39,4 +41,4 @@ do sleep 0.1 done -{{- end }} +#{{- end }} diff --git a/dot_profile.tmpl b/dot_profile.tmpl index fd26420..eb4441e 100644 --- a/dot_profile.tmpl +++ b/dot_profile.tmpl @@ -1,3 +1,6 @@ +# chezmoi:template:left-delimiter=#{{ +#{{- /* vim: set filetype=sh: */ -}} + export LANGUAGE=en_US:en export LC_MESSAGES=en_US.UTF-8 export LC_CTYPE=en_US.UTF-8 @@ -12,7 +15,7 @@ export XDG_DATA_HOME="${XDG_DATA_HOME:=$HOME/.local/share}" export XDG_INCLUDE_HOME="${XDG_INCLUDE_HOME:=$HOME/.local/include}" export XDG_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}" -{{- if eq .chezmoi.os "darwin" -}} +#{{- if eq .chezmoi.os "darwin" }} if [ "${XDG_RUNTIME_DIR}" = "" ]; then __TMPDIR__= __LINK__=/tmp/$(id -u) @@ -24,10 +27,9 @@ if [ "${XDG_RUNTIME_DIR}" = "" ]; then fi XDG_RUNTIME_DIR="${__TMPDIR__}" unset __TMPDIR__ __LINK__ + export XDG_RUNTIME_DIR fi - -export XDG_RUNTIME_DIR -{{- end }} +#{{- end }} env_file () { if [ ! -f "${1}" ]; then @@ -47,6 +49,7 @@ if [ -d "${XDG_CONFIG_HOME}/profile/env.d" ]; then for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do env_file "${file}" done + unset file fi unset env_file @@ -58,6 +61,5 @@ if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then . "$file" fi done + unset file fi - -# vim: ft=sh diff --git a/dot_zshrc b/dot_zshrc index 83d063a..3e65f0e 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -7,6 +7,7 @@ if [[ -d "${XDG_CONFIG_HOME}/zsh/env.d" ]]; then sed 's/^/export /g' )" done + unset file fi if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then @@ -16,6 +17,7 @@ if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then source "$file" fi done + unset file fi # vim: ft=zsh