update help

pull/3/head
kevin zhuang 4 years ago
parent 32d997f787
commit 6b78163a48

@ -22,12 +22,12 @@ source "${mydir}"/../helper/git_query.sh
function usage() {
echo -e "Usage: dotbare fadd [-h] [-f] [-d] ...\n"
echo -e "Stage the selected file to the dotfile gitbare repo"
echo -e "Press escape to stop staging file\n"
echo -e "Stage the selected file to the dotfile gitbare repo\n"
echo -e "Default: list all modified files and stage the selected files.\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -f\tselect a file in current directory and stage it"
echo -e " -d\tselect a entire folder to stage"
echo -e " -h\t\tshow this help message and exit"
echo -e " -f\t\tselect a file in current directory and stage it"
echo -e " -d\t\tselect a entire folder to stage"
}
#######################################

@ -25,10 +25,12 @@ function usage() {
echo -e "Usage: dotbare fbackup [-h] [-s] [-p PATH] ...\n"
echo -e "Backup files to ${DOTBARE_BACKUP}"
echo -e "This is useful when untracking files or migrating on new machines\n"
echo -e "Default: backup every tracked files using cp to ${DOTBARE_BACKUP} directory\n"
echo -e "optional arguments:"
echo -e " -h\t\tshow this help message and exit"
echo -e " -s\t\tselect individual file through fzf and backup"
echo -e " -p PATH\tsepcify path to backup"
echo -e " -m\t\tuse mv command for backup instead of default cp"
}
#######################################

@ -26,13 +26,13 @@ source "${mydir}"/../helper/git_query.sh
function usage() {
echo -e "Usage: dotbare fcheckout [-h] [-a] [-b] [-c] ...\n"
echo -e "Checkout files/commit/branch using fzf"
echo -e "By default, checkout files back to HEAD (Reset changes back to HEAD)\n"
echo -e "Checkout files/commit/branch using fzf\n"
echo -e "Default: checkout files back to HEAD (Reset changes back to HEAD)\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -a\tsearch all files and select a commit to checkout for selected files"
echo -e " -b\tcheckout branch"
echo -e " -c\tcheckout commit"
echo -e " -h\t\tshow this help message and exit"
echo -e " -a\t\tsearch all files and select a commit to checkout for selected files"
echo -e " -b\t\tlist all branch and checkout/switch the selected branch"
echo -e " -c\t\tlist all commits and checkout selected commit"
}
action_type="modified"

@ -22,8 +22,8 @@ source "${mydir}"/../helper/git_query.sh
function usage() {
echo -e "Usage: dotbare fedit [-h] [-m] [-c] ...\n"
echo -e "List all tracked dotfiles and edit"
echo -e "also support commit message edit\n"
echo -e "Select files/commits through fzf and edit selected files/commits\n"
echo -e "Default: list all dotfiles and edit the selected files\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -m\tonly display modified file"

@ -9,6 +9,7 @@
# Arguments
# -h: show help message and exit
# -u: specify remote dotfiles url to init
# -y: confirm action by default and skip confirmation
set -e
set -f
@ -21,9 +22,10 @@ function usage() {
echo -e "Usage: dotbare finit [-h] [-u URL] ...\n"
echo -e "Init the git bare repository if doesn't exist"
# shellcheck disable=SC2016
echo -e 'The bare repository will be initialised under ${DOTBARE_DIR}, default to $HOME/.cfg if not set'
echo -e 'The bare repository will be initialised under $DOTBARE_DIR, default to $HOME/.cfg if not set'
# shellcheck disable=SC2016
echo -e 'It will track ${DOTBARE_TREE}, default to $HOME if not set\n'
echo -e 'It will track $DOTBARE_TREE, default to $HOME if not set\n'
echo -e "Default: init the bare repository at $DOTBARE_DIR\n"
echo -e "optional arguments:"
echo -e " -h\t\tshow this help message and exit"
echo -e " -u URL\tmigrate existing dotfiles from the git URL to current system"

Loading…
Cancel
Save