diff --git a/sh/git.sh b/sh/git.sh index 38e1551..e8b210e 100644 --- a/sh/git.sh +++ b/sh/git.sh @@ -8,16 +8,16 @@ C %C(blue)%cn %ce %B" # add to index -ga() { git_add "${@}"; } -git_add() { +ga() { sh_git_add "${@}"; } +sh_git_add() { git \ add \ "${@}" } # add all to index -gaa() { git_add_all "${@}"; } -git_add_all() { +gaa() { sh_git_add_all "${@}"; } +sh_git_add_all() { git \ add \ --all \ @@ -25,8 +25,8 @@ git_add_all() { } # add parts of all to index -gaap() { git_add_all_patch "${@}"; } -git_add_all_patch() { +gaap() { sh_git_add_all_patch "${@}"; } +sh_git_add_all_patch() { git \ add \ --all \ @@ -35,8 +35,8 @@ git_add_all_patch() { } # add parts to index -gap() { git_add_patch "${@}"; } -git_add_patch() { +gap() { sh_git_add_patch "${@}"; } +sh_git_add_patch() { git \ add \ --patch \ @@ -44,16 +44,16 @@ git_add_patch() { } # create a branch -gb() { git_branch "${@}"; } -git_branch() { +gb() { sh_git_branch "${@}"; } +sh_git_branch() { git \ branch \ "${@}" } # delete a branch -gbd() { git_branch_delete "${@}"; } -git_branch_delete() { +gbd() { sh_git_branch_delete "${@}"; } +sh_git_branch_delete() { git \ branch \ --delete \ @@ -61,8 +61,8 @@ git_branch_delete() { } # force a branch deletion -gbdf() { git_branch_delete_force "${@}"; } -git_branch_delete_force() { +gbdf() { sh_git_branch_delete_force "${@}"; } +sh_git_branch_delete_force() { git \ branch \ --delete \ @@ -71,8 +71,8 @@ git_branch_delete_force() { } # list branches -gbl() { git_branch_list "${@}"; } -git_branch_list() { +gbl() { sh_git_branch_list "${@}"; } +sh_git_branch_list() { git \ branch \ --all \ @@ -83,8 +83,8 @@ git_branch_list() { } # set the link to a remote branch from a local branch -gbsu() { git_branch_set_upstream "${@}"; } -git_branch_set_upstream() { +gbsu() { sh_git_branch_set_upstream "${@}"; } +sh_git_branch_set_upstream() { git \ branch \ --set-upstream-to \ @@ -92,16 +92,16 @@ git_branch_set_upstream() { } # switch to a branch or checkout file(s) from a commit -gc() { git_checkout "${@}"; } -git_checkout() { +gc() { sh_git_checkout "${@}"; } +sh_git_checkout() { git \ checkout \ "${@}" } # checkout an orphan branch -gco() { git_checkout_orphan "${@}"; } -git_checkout_orphan() { +gco() { sh_git_checkout_orphan "${@}"; } +sh_git_checkout_orphan() { git \ checkout \ --orphan \ @@ -109,16 +109,16 @@ git_checkout_orphan() { } # pick a commit -gcp() { git_cherry_pick "${@}"; } -git_cherry_pick() { +gcp() { sh_git_cherry_pick "${@}"; } +sh_git_cherry_pick() { git \ cherry-pick \ "${@}" } # abort the commit pick -gcpa() { git_cherry_pick_abort "${@}"; } -git_cherry_pick_abort() { +gcpa() { sh_git_cherry_pick_abort "${@}"; } +sh_git_cherry_pick_abort() { git \ cherry-pick \ --abort \ @@ -126,8 +126,8 @@ git_cherry_pick_abort() { } # continue the commit pick -gcpc() { git_cherry_pick_continue "${@}"; } -git_cherry_pick_continue() { +gcpc() { sh_git_cherry_pick_continue "${@}"; } +sh_git_cherry_pick_continue() { git \ cherry-pick \ --continue \ @@ -135,8 +135,8 @@ git_cherry_pick_continue() { } # clean untracked files -gcf() { git_clean_force "${@}"; } -git_clean_force() { +gcf() { sh_git_clean_force "${@}"; } +sh_git_clean_force() { git \ clean \ -d \ @@ -145,8 +145,8 @@ git_clean_force() { } # redo the last commit with a different message -gcam() { git_commit_amend_message "${@}"; } -git_commit_amend_message() { +gcam() { sh_git_commit_amend_message "${@}"; } +sh_git_commit_amend_message() { git \ commit \ --amend \ @@ -155,8 +155,8 @@ git_commit_amend_message() { } # make a root commit -gcem() { git_commit_empty_message "${@}"; } -git_commit_empty_message() { +gcem() { sh_git_commit_empty_message "${@}"; } +sh_git_commit_empty_message() { git \ commit \ --allow-empty \ @@ -166,8 +166,8 @@ git_commit_empty_message() { } # commit the index -gcm() { git_commit_message "${@}"; } -git_commit_message() { +gcm() { sh_git_commit_message "${@}"; } +sh_git_commit_message() { git \ commit \ --message \ @@ -175,8 +175,8 @@ git_commit_message() { } # configure the user email -gcue() { git_config_user_email "${@}"; } -git_config_user_email() { +gcue() { sh_git_config_user_email "${@}"; } +sh_git_config_user_email() { git \ config \ "user.email" \ @@ -184,8 +184,8 @@ git_config_user_email() { } # configure the user name -gcun() { git_config_user_name "${@}"; } -git_config_user_name() { +gcun() { sh_git_config_user_name "${@}"; } +sh_git_config_user_name() { git \ config \ "user.name" \ @@ -193,16 +193,16 @@ git_config_user_name() { } # differences from last or between commits -gd() { git_diff "${@}"; } -git_diff() { +gd() { sh_git_diff "${@}"; } +sh_git_diff() { git \ diff \ "${@}" } # display what is indexed in cache -gdc() { git_diff_cached "${@}"; } -git_diff_cached() { +gdc() { sh_git_diff_cached "${@}"; } +sh_git_diff_cached() { git \ diff \ --cached \ @@ -210,8 +210,8 @@ git_diff_cached() { } # indexed character-level differences -gdcw() { git_diff_cached_word "${@}"; } -git_diff_cached_word() { +gdcw() { sh_git_diff_cached_word "${@}"; } +sh_git_diff_cached_word() { git \ diff \ --cached \ @@ -220,8 +220,8 @@ git_diff_cached_word() { } # differences via external tool -gdt() { git_diff_tool "${@}"; } -git_diff_tool() { +gdt() { sh_git_diff_tool "${@}"; } +sh_git_diff_tool() { git \ difftool \ --dir-diff \ @@ -229,8 +229,8 @@ git_diff_tool() { } # character-level differences -gdw() { git_diff_word "${@}"; } -git_diff_word() { +gdw() { sh_git_diff_word "${@}"; } +sh_git_diff_word() { git \ diff \ --word-diff-regex "." \ @@ -238,8 +238,8 @@ git_diff_word() { } # fetch from the remote repository -gf() { git_fetch "${@}"; } -git_fetch() { +gf() { sh_git_fetch "${@}"; } +sh_git_fetch() { git \ fetch \ --tags \ @@ -248,16 +248,16 @@ git_fetch() { } # fetch from remote repository and prune local orphan branches -gfp() { git_fetch_prune "${@}"; } -git_fetch_prune() { - git_fetch \ +gfp() { sh_git_fetch_prune "${@}"; } +sh_git_fetch_prune() { + sh_git_fetch \ --prune \ "${@}" } # garbage collect all orphan commits -ggc() { git_garbage_collect "${@}"; } -git_garbage_collect() { +ggc() { sh_git_garbage_collect "${@}"; } +sh_git_garbage_collect() { git \ reflog \ expire \ @@ -270,16 +270,16 @@ git_garbage_collect() { } # initialize a new repository -gi() { git_init "${@}"; } -git_init() { +gi() { sh_git_init "${@}"; } +sh_git_init() { git \ init \ "${@}" } # initialize a new bare repository -gib() { git_init_bare "${@}"; } -git_init_bare() { +gib() { sh_git_init_bare "${@}"; } +sh_git_init_bare() { git \ init \ --bare \ @@ -287,8 +287,8 @@ git_init_bare() { } # log history -gl() { git_log "${@}"; } -git_log() { +gl() { sh_git_log "${@}"; } +sh_git_log() { git \ log \ --abbrev=8 \ @@ -299,33 +299,33 @@ git_log() { } # log all history -gla() { git_log_all "${@}"; } -git_log_all() { - git_log \ +gla() { sh_git_log_all "${@}"; } +sh_git_log_all() { + sh_git_log \ --all \ "${@}" } # log all history with patches -glap() { git_log_all_patch "${@}"; } -git_log_all_patch() { - git_log \ +glap() { sh_git_log_all_patch "${@}"; } +sh_git_log_all_patch() { + sh_git_log \ --all \ --patch \ "${@}" } # log history with patches -glp() { git_log_patch "${@}"; } -git_log_patch() { - git_log \ +glp() { sh_git_log_patch "${@}"; } +sh_git_log_patch() { + sh_git_log \ --patch \ "${@}" } # fast-forward merge to remote branch -gm() { git_merge "${@}"; } -git_merge() { +gm() { sh_git_merge "${@}"; } +sh_git_merge() { git \ merge \ --ff-only \ @@ -333,8 +333,8 @@ git_merge() { } # abort the current merge commit -gma() { git_merge_abort "${@}"; } -git_merge_abort() { +gma() { sh_git_merge_abort "${@}"; } +sh_git_merge_abort() { git \ merge \ --abort \ @@ -342,8 +342,8 @@ git_merge_abort() { } # do a merge commit -gmc() { git_merge_commit "${@}"; } -git_merge_commit() { +gmc() { sh_git_merge_commit "${@}"; } +sh_git_merge_commit() { git \ merge \ --no-ff \ @@ -352,8 +352,8 @@ git_merge_commit() { } # squash a branch and index its modifications -gms() { git_merge_squash "${@}"; } -git_merge_squash() { +gms() { sh_git_merge_squash "${@}"; } +sh_git_merge_squash() { git \ merge \ --squash \ @@ -361,16 +361,16 @@ git_merge_squash() { } # merge via external tool -gmt() { git_merge_tool "${@}"; } -git_merge_tool() { +gmt() { sh_git_merge_tool "${@}"; } +sh_git_merge_tool() { git \ mergetool \ "${@}" } # push to the remote repository -gp() { git_push "${@}"; } -git_push() { +gp() { sh_git_push "${@}"; } +sh_git_push() { git \ push \ --tags \ @@ -379,8 +379,8 @@ git_push() { } # delete from the remote repository -gpd() { git_push_delete "${@}"; } -git_push_delete() { +gpd() { sh_git_push_delete "${@}"; } +sh_git_push_delete() { git \ push \ --delete \ @@ -388,24 +388,24 @@ git_push_delete() { } # force the push to the remote repository -gpf() { git_push_force "${@}"; } -git_push_force() { - git_push \ +gpf() { sh_git_push_force "${@}"; } +sh_git_push_force() { + sh_git_push \ --force \ "${@}" } # rebase current branch onto another -grb() { git_re_base "${@}"; } -git_re_base() { +grb() { sh_git_re_base "${@}"; } +sh_git_re_base() { git \ rebase \ "${@}" } # abort current rebase -grba() { git_re_base_abort "${@}"; } -git_re_base_abort() { +grba() { sh_git_re_base_abort "${@}"; } +sh_git_re_base_abort() { git \ rebase \ --abort \ @@ -413,8 +413,8 @@ git_re_base_abort() { } # continue current rebase -grbc() { git_re_base_continue "${@}"; } -git_re_base_continue() { +grbc() { sh_git_re_base_continue "${@}"; } +sh_git_re_base_continue() { git \ rebase \ --continue \ @@ -422,8 +422,8 @@ git_re_base_continue() { } # force rebase without fast-forward -grbf() { git_re_base_force "${@}"; } -git_re_base_force() { +grbf() { sh_git_re_base_force "${@}"; } +sh_git_re_base_force() { git \ rebase \ --force-rebase \ @@ -431,8 +431,8 @@ git_re_base_force() { } # rebase interactively -grbi() { git_re_base_interactive "${@}"; } -git_re_base_interactive() { +grbi() { sh_git_re_base_interactive "${@}"; } +sh_git_re_base_interactive() { git \ rebase \ --interactive \ @@ -440,8 +440,8 @@ git_re_base_interactive() { } # add a new remote repository -grma() { git_re_mote_add "${@}"; } -git_re_mote_add() { +grma() { sh_git_re_mote_add "${@}"; } +sh_git_re_mote_add() { git \ remote \ add \ @@ -449,8 +449,8 @@ git_re_mote_add() { } # list remote repositories -grml() { git_re_mote_list "${@}"; } -git_re_mote_list() { +grml() { sh_git_re_mote_list "${@}"; } +sh_git_re_mote_list() { git \ remote \ --verbose \ @@ -458,8 +458,8 @@ git_re_mote_list() { } # set the location of a remote repository -grmsu() { git_re_mote_set_upstream "${@}"; } -git_re_mote_set_upstream() { +grmsu() { sh_git_re_mote_set_upstream "${@}"; } +sh_git_re_mote_set_upstream() { git \ remote \ set-url \ @@ -467,8 +467,8 @@ git_re_mote_set_upstream() { } # show connection to a remote repository -grms() { git_re_mote_show "${@}"; } -git_re_mote_show() { +grms() { sh_git_re_mote_show "${@}"; } +sh_git_re_mote_show() { git \ remote \ show \ @@ -476,24 +476,24 @@ git_re_mote_show() { } # remove and add removal to index -grm() { git_re_move "${@}"; } -git_re_move() { +grm() { sh_git_re_move "${@}"; } +sh_git_re_move() { git \ rm \ "${@}" } # remove file(s) from index or move current branch pointer -grs() { git_re_set "${@}"; } -git_re_set() { +grs() { sh_git_re_set "${@}"; } +sh_git_re_set() { git \ reset \ "${@}" } # wipe modifications or reset current branch to another commit -grsh() { git_re_set_hard "${@}"; } -git_re_set_hard() { +grsh() { sh_git_re_set_hard "${@}"; } +sh_git_re_set_hard() { git \ reset \ --hard \ @@ -501,16 +501,16 @@ git_re_set_hard() { } # show a commit -gsc() { git_show_commit "${@}"; } -git_show_commit() { +gsc() { sh_git_show_commit "${@}"; } +sh_git_show_commit() { git \ show \ "${@}" } # current state of repository -gs() { git_status "${@}"; } -git_status() { +gs() { sh_git_status "${@}"; } +sh_git_status() { git \ status \ --untracked-files="all" \ @@ -518,16 +518,16 @@ git_status() { } # tag a commit -gt() { git_tag "${@}"; } -git_tag() { +gt() { sh_git_tag "${@}"; } +sh_git_tag() { git \ tag \ "${@}" } # delete a tag -gtd() { git_tag_delete "${@}"; } -git_tag_delete() { +gtd() { sh_git_tag_delete "${@}"; } +sh_git_tag_delete() { git \ tag \ --delete \