From aaed8ee1bcb2b49fab75ed2bbe38ab3dfcce60c3 Mon Sep 17 00:00:00 2001 From: kevin zhuang Date: Wed, 1 Jul 2020 17:58:32 +1000 Subject: [PATCH] fix(main): fix main script's no argument wrong help display --- dotbare | 4 ++-- scripts/fupgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotbare b/dotbare index e7dc4db..b34fc7b 100755 --- a/dotbare +++ b/dotbare @@ -41,8 +41,8 @@ function usage() { if [[ "$#" -eq 0 ]]; then find "${mydir}"/scripts/* -type f -print0 \ | xargs -I __ -0 basename __ \ - | fzf --no-multi --header='Available commands' --preview="dotbare {} -h" \ - | xargs -I __ dotbare __ -h + | fzf --no-multi --header='Available commands' --preview="${mydir}/dotbare {} -h" \ + | xargs -I __ "${mydir}"/dotbare __ -h exit 0 fi diff --git a/scripts/fupgrade b/scripts/fupgrade index ded140b..049aacd 100755 --- a/scripts/fupgrade +++ b/scripts/fupgrade @@ -8,9 +8,9 @@ mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" function usage() { echo -e "Usage: dotbare fupgrade [-h] ...\n" - echo -e "Upgrade dotbare to the latest master\n" + echo -e "Upgrade dotbare to the latest master.\n" echo -e "optional arguments:" - echo -e " -h, --help\t\tshow this help message and exit" + echo -e " -h, --help\t\tshow this help message and exit." } while [[ "$#" -gt 0 ]]; do