Added czedext

This commit is contained in:
Lockszmith (@VAST) 2025-03-17 16:31:01 -04:00
parent c0275625b1
commit f614c89c3e
1 changed files with 7 additions and 0 deletions

View File

@ -10,4 +10,11 @@ if is_cmd 'chezmoi'; then
czcd() {
cd "$(chezmoi source-path "${@}")"
}
czedext() {
local CZ_EXT="$(find $(chezmoi source-path) -mindepth 1 -maxdepth 1 -name '.chezmoiexternal.*')"
CZ_EXT="${CZ_EXT:-$(chezmoi source-path "${@}")/.chezmoiexternal.yaml.tmpl}"
"${VISUAL:-${EDITOR:-vi}}" "${CZ_EXT}"
}
fi
# vim: set ft=bash sw=4 sts=4 et: