update help

pull/3/head
kevin zhuang 4 years ago
parent 6b78163a48
commit 57fc9fe5c5

@ -25,9 +25,9 @@ function usage() {
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"
echo -e " -c\tedit commit using interactive rebase instead"
echo -e " -h\t\tshow this help message and exit"
echo -e " -m\t\tonly display modified file"
echo -e " -c\t\tedit commit using interactive rebase instead"
}
edit_type='all'

@ -14,6 +14,7 @@
# -R: reset HEAD back to the selected commit
# -e: edit commmit (interactive rebase)
# -c: checkout selected commmit
# -y: confirm action by default and skip confirmation
set -e
set -f
@ -26,14 +27,15 @@ source "${mydir}"/../helper/get_confirmation.sh
function usage() {
echo -e "Usage: dotbare flog [-h] [-r] [-R] [-e] [-c] ...\n"
echo -e "Interactive log viewer with action menu"
echo -e "Action menu contains command including revert|reset|edit|checkout"
echo -e "Action menu contains command including revert|reset|edit|checkout|exit\n"
echo -e "Default: list all commits and prompt a menu for user to take action on the selected commit\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -r\trevert the selected commit"
echo -e " -R\treset HEAD back to selected commit"
echo -e " -e\tedit selected commit through interactive rebase"
echo -e " -c\tcheckout selected commit"
echo -e " -y\tconfirm action by default and skip confirmation"
echo -e " -h\t\tshow this help message and exit"
echo -e " -r\t\trevert the selected commit"
echo -e " -R\t\treset HEAD back to selected commit"
echo -e " -e\t\tedit selected commit through interactive rebase"
echo -e " -c\t\tcheckout selected commit"
echo -e " -y\t\tconfirm action by default and skip confirmation"
}
#######################################

@ -31,13 +31,14 @@ function usage() {
echo -e "Usage: dotbare freset [-h] [-a] [-c] [-S] [-H] ...\n"
echo -e "Reset/Unstage the selected staged file"
echo -e "Or reset the HEAD to certain commits by using -c flag\n"
echo -e "Default: unstage the selected files from\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -a\tselect files and then select a commit to reset the file back to the selected comit"
echo -e " -c\treset commit to certain commit, default --mixed flag, reset HEAD to certain commit put all changes into modified states"
echo -e " -S\treset commit using --soft flag, reset HEAD to certain commit without modify working tree"
echo -e " -H\treset commit using --hard flag, reset HEAD to certain commit dicard all changes from the working tree"
echo -e " -y\tconfirm action by default and skip confirmation"
echo -e " -h\t\tshow this help message and exit"
echo -e " -a\t\tselect files and then select a commit to reset the file back to the selected comit"
echo -e " -c\t\treset commit to certain commit, default --mixed flag, reset HEAD to certain commit put all changes into modified states"
echo -e " -S\t\treset commit using --soft flag, reset HEAD to certain commit without modify working tree"
echo -e " -H\t\treset commit using --hard flag, reset HEAD to certain commit dicard all changes from the working tree"
echo -e " -y\t\tconfirm action by default and skip confirmation"
}
reset_option="--mixed"

@ -24,14 +24,13 @@ source "${mydir}"/../helper/git_query.sh
function usage() {
echo -e "Usage: dotbare fstash [-h] [-f] [-d] [-p] ...\n"
echo -e "save/apply stash using fzf"
echo -e "By default, running fstash will apply the selected stash"
echo -e "To stash only some files, add -f flag\n"
echo -e "save/apply/delect stash using fzf, also supports stashing individual file\n"
echo -e "Default: running fstash will apply the selected stash\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -f\tselect modified files through fzf and stash them"
echo -e " -d\tdelete the selected stash from stash list"
echo -e " -p\tuse pop instead of apply when retrieving stash"
echo -e " -h\t\tshow this help message and exit"
echo -e " -f\t\tselect modified files through fzf and stash them"
echo -e " -d\t\tdelete the selected stash from stash list"
echo -e " -p\t\tuse pop instead of apply when retrieving stash"
}
stash_command="apply"

@ -23,7 +23,7 @@ function usage() {
echo -e "Display interactive git status menu"
echo -e "Stage, unstage, interactively\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -h\t\tshow this help message and exit"
}
while getopts ":h" opt; do

@ -12,6 +12,7 @@
# -h: display help message and exit
# -s: temporarily untrack files
# -S: resume track of temp untracked files
# -y: confirm action by default and skip confirmation
set -e
set -f
@ -24,17 +25,17 @@ source "${mydir}"/../helper/get_confirmation.sh
function usage() {
echo -e "Usage: dotbare funtrack [-h] [-s] [-S] ...\n"
echo -e "Untrack selected files from git\n"
echo -e "Note: by default, the untrack will remove the file from index while"
echo -e "Default: the untrack will remove the file from index while"
echo -e "keeping the file in your current system (git rm --cached filename)"
echo -e "however, when your other computer pull down the changes, the file will be removed"
echo -e "make sure to run dotbare fbackup before pulling down the changes, alternativly"
echo -e "use the -s flag (git update-index --assume-unchanged [path])\n"
echo -e "optional arguments:"
echo -e " -h\tshow this help message and exit"
echo -e " -s\ttemporarily ignore changes of selected files"
echo -e " \tuse -S flag to resume tracking changes of selected_files"
echo -e " -S\tresume tracking changes of selected files"
echo -e " -y\tconfirm action by default and skip confirmation"
echo -e " -h\t\tshow this help message and exit"
echo -e " -s\t\ttemporarily ignore changes of selected files"
echo -e " \t\tuse -S flag to resume tracking changes of selected_files"
echo -e " -S\t\tresume tracking changes of selected files"
echo -e " -y\t\tconfirm action by default and skip confirmation"
}
track_type="untrack"

Loading…
Cancel
Save