echo ${i#$d/remotes/}
done
[ "$ngoff" ] && shopt -u nullglob
- for i in $(git --git-dir="$d" repo-config --list); do
+ for i in $(git --git-dir="$d" config --list); do
case "$i" in
remote.*.url=*)
i="${i#remote.}"
__git_aliases ()
{
local i IFS=$'\n'
- for i in $(git --git-dir="$(__gitdir)" repo-config --list); do
+ for i in $(git --git-dir="$(__gitdir)" config --list); do
case "$i" in
alias.*)
i="${i#alias.}"
__git_aliased_command ()
{
local word cmdline=$(git --git-dir="$(__gitdir)" \
- repo-config --get "alias.$1")
+ config --get "alias.$1")
for word in $cmdline; do
if [ "${word##-*}" ]; then
echo $word
COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
}
-_git_repo_config ()
+_git_config ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
local prv="${COMP_WORDS[COMP_CWORD-1]}"
core.compression
core.legacyHeaders
i18n.commitEncoding
+ i18n.logOutputEncoding
diff.color
color.diff
diff.renameLimit
COMPREPLY=($(compgen -W "$opt $(__git_refs)" -- "$cur"))
}
+_git_show ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --pretty=*)
+ COMPREPLY=($(compgen -W "
+ oneline short medium full fuller email raw
+ " -- "${cur##--pretty=}"))
+ return
+ ;;
+ --*)
+ COMPREPLY=($(compgen -W "--pretty=" -- "$cur"))
+ return
+ ;;
+ esac
+ __git_complete_file
+}
+
_git ()
{
local i c=1 command __git_dir
checkout) _git_checkout ;;
cherry-pick) _git_cherry_pick ;;
commit) _git_commit ;;
+ config) _git_config ;;
diff) _git_diff ;;
diff-tree) _git_diff_tree ;;
fetch) _git_fetch ;;
pull) _git_pull ;;
push) _git_push ;;
rebase) _git_rebase ;;
- repo-config) _git_repo_config ;;
+ repo-config) _git_config ;;
reset) _git_reset ;;
- show) _git_log ;;
+ show) _git_show ;;
show-branch) _git_log ;;
whatchanged) _git_log ;;
*) COMPREPLY=() ;;
complete -o default -o nospace -F _git_pull git-pull
complete -o default -o nospace -F _git_push git-push
complete -o default -F _git_rebase git-rebase
-complete -o default -F _git_repo_config git-repo-config
+complete -o default -F _git_config git-config
complete -o default -F _git_reset git-reset
-complete -o default -F _git_log git-show
+complete -o default -o nospace -F _git_show git-show
complete -o default -o nospace -F _git_log git-show-branch
complete -o default -o nospace -F _git_log git-whatchanged
complete -o default -F _git_merge_base git-merge-base.exe
complete -o default -F _git_name_rev git-name-rev.exe
complete -o default -o nospace -F _git_push git-push.exe
-complete -o default -F _git_repo_config git-repo-config
-complete -o default -o nospace -F _git_log git-show.exe
+complete -o default -F _git_config git-config
+complete -o default -o nospace -F _git_show git-show.exe
complete -o default -o nospace -F _git_log git-show-branch.exe
complete -o default -o nospace -F _git_log git-whatchanged.exe
fi