diff --git a/git.scmbrc.example b/git.scmbrc.example index a174c32..c9cfdc9 100644 --- a/git.scmbrc.example +++ b/git.scmbrc.example @@ -19,7 +19,7 @@ export GIT_REPO_DIR="$HOME/src" export GIT_REPOS="" export git_status_command="git_status_shortcuts" # Alias -git_repo_alias="s" +git_repo_alias="s" # The 's' could stand for 'switch' or 'sourcecode'.. # Git Aliases diff --git a/lib/git/aliases_and_bindings.sh b/lib/git/aliases_and_bindings.sh index 157bb5a..44f9625 100644 --- a/lib/git/aliases_and_bindings.sh +++ b/lib/git/aliases_and_bindings.sh @@ -42,7 +42,7 @@ alias $git_commit_amend_alias='git commit --amend' # Add staged changes to latest commit without prompting for message alias $git_commit_amend_no_msg_alias='git commit --amend -C HEAD' -# Git repo management alias +# Git Index alias alias $git_index_alias="git_index" diff --git a/lib/git/repo_index.sh b/lib/git/repo_index.sh index e9a8d5b..959eda1 100644 --- a/lib/git/repo_index.sh +++ b/lib/git/repo_index.sh @@ -5,7 +5,7 @@ # ------------------------------------------------------- # ------------------------------------------------------- -# Repository Indexing scripts for Git projects +# Repository Index scripts for Git projects # ------------------------------------------------------- @@ -18,7 +18,7 @@ # (Scanning for git projects and submodules can take a few seconds.) # # * Cache can be rebuilt by running: -# $ git_index --rebuild-index +# $ git_index --rebuild # ('--' commands have tab completion too.) # # * Ignores projects within an 'archive' folder. @@ -53,7 +53,7 @@ function git_index() { # Just change to $GIT_REPO_DIR if no params given. cd $GIT_REPO_DIR else - if [ "$1" = "--rebuild-index" ]; then + if [ "$1" = "--rebuild" ]; then _rebuild_git_index elif [ "$1" = "--update-all" ]; then _git_index_git_update_all @@ -221,7 +221,7 @@ function _git_index_tab_completion() { COMPREPLY=($(compgen -d "$base_path$search_path" | grep -v "/.git" | sed -e "s:$base_path:$project:" -e "s:$:/:" )) # Else, tab complete all the entries in .git_index, plus '--' commands else - local commands="--list\n--rebuild-index\n--update-all\n--batch-cmd\n--count-by-host" + local commands="--list\n--rebuild\n--update-all\n--batch-cmd\n--count-by-host" COMPREPLY=($(compgen -W '$(sed -e "s:.*/::" -e "s:$:/:" "$GIT_REPO_DIR/.git_index" | sort)$(echo -e "\n"$commands)' -- $curw)) fi return 0 diff --git a/test/lib/git/repo_index_test.sh b/test/lib/git/repo_index_test.sh index b02fe15..b7bc197 100755 --- a/test/lib/git/repo_index_test.sh +++ b/test/lib/git/repo_index_test.sh @@ -90,7 +90,7 @@ index_no_newlines() { #----------------------------------------------------------------------------- test_repo_index_command() { - git_index --rebuild-index > /dev/null + git_index --rebuild > /dev/null # Test that all repos are detected, and sorted alphabetically assertIncludes "$(index_no_newlines)" "bitbucket.*\