Rearanging and merging aliases.env
This commit is contained in:
parent
61b5f3f441
commit
fa83394898
11 changed files with 91 additions and 165 deletions
|
@ -8,7 +8,7 @@ if is_cmd 'chezmoi'; then
|
|||
export CHEZMOI_GITHUB_ACCESS_TOKEN={{- .githubToken | quote }}
|
||||
|
||||
czcd() {
|
||||
cd "$(chezmoi source-path "${@}")"
|
||||
cd "$(chezmoi source-path "${@}")"
|
||||
}
|
||||
czedext() {
|
||||
local CZ_EXT="$(find $(chezmoi source-path) -mindepth 1 -maxdepth 1 -name '.chezmoiexternal.*')"
|
||||
|
@ -16,8 +16,16 @@ if is_cmd 'chezmoi'; then
|
|||
"${VISUAL:-${EDITOR:-vi}}" "${CZ_EXT}"
|
||||
}
|
||||
czed() {
|
||||
chezmoi edit "${@}" --apply --interactive
|
||||
local EDITLIST=() f _f
|
||||
for _f in "${@}"; do
|
||||
[[ -e "$_f" ]] || f="$(which "$_f")"
|
||||
[[ -z "$f" ]] && is_cmd tv && f="$(tv "$_f")" || f=$_f
|
||||
EDITLIST=( "${EDITLIST[@]}" "$f" )
|
||||
done
|
||||
EDITLIST=("${@}")
|
||||
chezmoi edit "${EDITLIST[@]}" --apply --interactive
|
||||
}
|
||||
alias czx="CZ_EXTR=1 chezmoi "
|
||||
fi
|
||||
|
||||
# vim: set ft=bash sw=4 sts=4 et:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue