fix: dotbare-transform unwanted space

pull/28/head
Kevin Zhuang 3 years ago
parent 6b376ce250
commit 62e2c66a0c

@ -170,7 +170,7 @@ _widget_git_transform_dotbare() {
dotbare_cmd=$(alias | grep dotbare | cut -d'=' -f1 | head -n 1)
[[ -z "${dotbare_cmd}" ]] && dotbare_cmd="dotbare"
dotbare_cmd="${dotbare_cmd} -g"
new_cmd=$(echo "$BUFFER" \
BUFFER=$(echo "$BUFFER" \
| awk -v dotbare="${dotbare_cmd}" '{
if ($1 == "git") {
$1=dotbare
@ -184,7 +184,6 @@ _widget_git_transform_dotbare() {
print $0
}'
)
BUFFER="${new_cmd} "
zle end-of-line
}

Loading…
Cancel
Save