From f614c89c3eb73193a2cd45de0a366d1bc08c5984 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@VAST)" Date: Mon, 17 Mar 2025 16:31:01 -0400 Subject: [PATCH] Added czedext --- _src.posix/private_dot_config/sz.env/zzz_chezmoi.env.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_src.posix/private_dot_config/sz.env/zzz_chezmoi.env.tmpl b/_src.posix/private_dot_config/sz.env/zzz_chezmoi.env.tmpl index a7d2714..aa76df1 100644 --- a/_src.posix/private_dot_config/sz.env/zzz_chezmoi.env.tmpl +++ b/_src.posix/private_dot_config/sz.env/zzz_chezmoi.env.tmpl @@ -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: