fix: dotbare with no args fails on linux system #23

pull/25/head
Kevin Zhuang 4 years ago
parent 6656ef1d86
commit 3938eea824

@ -43,7 +43,8 @@ Available commands:
} }
function list_dotbare_commands() { function list_dotbare_commands() {
find "${mydir}"/scripts/* -type f -exec basename {} + \ find "${mydir}"/scripts/* -type f \
| xargs -I __ basename __ \
| fzf --no-multi --header='Available commands' --preview="${mydir}/dotbare {} -h" \ | fzf --no-multi --header='Available commands' --preview="${mydir}/dotbare {} -h" \
| xargs -I __ "${mydir}"/dotbare __ -h | xargs -I __ "${mydir}"/dotbare __ -h
} }
@ -85,7 +86,7 @@ case "$1" in
shift shift
case "$1" in case "$1" in
fbackup|finit|fupgrade) fbackup|finit|fupgrade)
echo "dotbare $1 is not supported when using dotbare as a generic fuzzy git tool" echo "dotbare $1 is not supported when using dotbare as a generic fuzzy git tool" >&2
exit 1 exit 1
;; ;;
*) *)
@ -93,7 +94,7 @@ case "$1" in
;; ;;
esac esac
else else
echo "Not in a git directory" echo "Not in a git directory" >&2
exit 1 exit 1
fi fi
;; ;;

Loading…
Cancel
Save