chezmoi invocation improvements/fixes
這個提交存在於:
父節點
94752b1b5e
當前提交
b2009f3948
共有 1 個檔案被更改,包括 3 行新增 和 4 行删除
|
@ -15,11 +15,10 @@ if is_cmd 'chezmoi'; then
|
||||||
|
|
||||||
chezmoi() {
|
chezmoi() {
|
||||||
${SET_X:-:} -x
|
${SET_X:-:} -x
|
||||||
local _args=()
|
|
||||||
[ $# -ge 2 ] && _args=("${@:2}")
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"cd") cd "$(command chezmoi source-path "${_args[@]}")" ;;
|
"cd") cd "$(chezmoi source-path "${@:2}")" ;;
|
||||||
"edit") ${VISUAL:-${EDITOR:-vi}} $(command chezmoi sourch-path "${_args[@]}") ;;
|
"edit") ${VISUAL:-${EDITOR:-vi}} $(chezmoi source-path "${@:2}") ;;
|
||||||
|
"source-path") printf '%s\n' "${@:2}" | xargs -r chezmoi source-path ;;
|
||||||
*) command chezmoi "${@}" ;;
|
*) command chezmoi "${@}" ;;
|
||||||
esac
|
esac
|
||||||
${SET_X:-:} +x
|
${SET_X:-:} +x
|
||||||
|
|
載入中…
新增表格
新增連結
在新問題中引用