From 7298da2cc4b41be0175d762ace5166fb9aa36e92 Mon Sep 17 00:00:00 2001 From: William Hilton Date: Tue, 3 Nov 2015 02:03:54 -0500 Subject: [PATCH] Update README some. --- README.md | 26 ++++++++++++++++++++++---- bash_completion | 10 +++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2e446ae..3816d98 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,11 @@ EDIT: Even better example of inanity of git CLI: To get the SHA reference of HEA get | git ------------- | ------------- +get add | git add get stage | git add -u :/ -get stage %FILES% | git add %FILES% +get stage | git add get unstage | git reset HEAD -get unstage %FILES% | git reset HEAD %FILES% +get unstage | git reset HEAD get reset | git checkout -f HEAD get reset %FILES% | git checkout %FILES% get commit %MESSAGE% | git commit -m %MESSAGE% @@ -53,9 +54,26 @@ get tag %TAG% | git tag %TAG% get untag %TAG% | Deletes local tag. Y/N prompt to delete remote tag. get lg | git log --graph --pretty=format:'%h - %d %s (%cr) <%an>' --abbrev-commit -10 +Short Aliases | Full +--------------|----- +get ? | get status +get + | get add +get - | get rm +get = | get stage +get ! | get commit +get @ | get branch +get # | get tag +get ^ | get push + + ### TODO -Now that I've added tab completion, I think "stage" and "status" are too similar. -Also, I have three commands that start with "r" which is a problem. +* ~~Now that I've added tab completion, I think "stage" and "status" are too similar.~~ + I've solved that for now by adding short aliases 'get =' and 'get ?'. Not intuitive, + but I didn't want to rename status or stage. (Remember, I'm + trying to keep as much lingo unchanged.) It's the same number of keystrokes as if using + tab completion and one letter. I know, I know, still feels inconvenient somehow. +* Also, I have ~~three~~ four commands that start with "r" which is a problem for tab completion. + Seriously considering renaming 'rmbranch' to 'unbranch' to match 'untag' and 'unstage'. ### Changelog - I renamed "update" to "fetch" to avoid completion conflicts with "unstage". diff --git a/bash_completion b/bash_completion index b8cb1b0..6c43bef 100644 --- a/bash_completion +++ b/bash_completion @@ -39,17 +39,21 @@ case ${COMP_CWORD} in '=' | stage | reset) COMPREPLY=( $(compgen -W "$(list_modified)" "$2") ) ;; - # + # unstage) COMPREPLY=( $(compgen -W "$(list_staged)" "$2") ) ;; - '-' | rm | diff) + # + '-' | rm) COMPREPLY=( $(compgen -W "$(list_tracked)" "$2") ) ;; + diff) + COMPREPLY=( $(compgen -W "$(list_tracked)" -W "STAGE" -W "HEAD" "$2") ) + ;; # '+' | add) compopt -o nospace - COMPREPLY=( $(compgen -W "$(list_untracked)" -W "STAGE" -W "HEAD" "$2") ) + COMPREPLY=( $(compgen -W "$(list_untracked)" "$2") ) ;; esac ;;