fix(main): use find over ls

pull/18/head
kevin zhuang 4 years ago
parent 682cc87a60
commit 534babf0dc

@ -43,10 +43,9 @@ function usage() {
}
# if no argument, display all possible actions
# disbale shell check for ls, we are not processing
if [[ $# -eq 0 ]]; then
# shellcheck disable=SC2012
ls "${mydir}"/scripts \
find scripts/* -type f -print0 \
| xargs -I __ -0 basename __ \
| fzf --no-multi --header='Available commands' --preview="dotbare {} -h" \
| xargs -I __ dotbare __ -h
exit 0

Loading…
Cancel
Save