Merge branch 'sg/complete-symmetric-diff'
* sg/complete-symmetric-diff: bash: complete 'git diff ...branc<TAB>' bash: fix misindented esac statement in __git_complete_file()
This commit is contained in:
commit
1c92e39446
@ -664,11 +664,14 @@ __git_compute_merge_strategies ()
|
|||||||
: ${__git_merge_strategies:=$(__git_list_merge_strategies)}
|
: ${__git_merge_strategies:=$(__git_list_merge_strategies)}
|
||||||
}
|
}
|
||||||
|
|
||||||
__git_complete_file ()
|
__git_complete_revlist_file ()
|
||||||
{
|
{
|
||||||
local pfx ls ref cur
|
local pfx ls ref cur
|
||||||
_get_comp_words_by_ref -n =: cur
|
_get_comp_words_by_ref -n =: cur
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
|
*..?*:*)
|
||||||
|
return
|
||||||
|
;;
|
||||||
?*:*)
|
?*:*)
|
||||||
ref="${cur%%:*}"
|
ref="${cur%%:*}"
|
||||||
cur="${cur#*:}"
|
cur="${cur#*:}"
|
||||||
@ -682,7 +685,7 @@ __git_complete_file ()
|
|||||||
*)
|
*)
|
||||||
ls="$ref"
|
ls="$ref"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$COMP_WORDBREAKS" in
|
case "$COMP_WORDBREAKS" in
|
||||||
*:*) : great ;;
|
*:*) : great ;;
|
||||||
@ -707,17 +710,6 @@ __git_complete_file ()
|
|||||||
s/^.* //')" \
|
s/^.* //')" \
|
||||||
-- "$cur"))
|
-- "$cur"))
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
__gitcomp "$(__git_refs)"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
__git_complete_revlist ()
|
|
||||||
{
|
|
||||||
local pfx cur
|
|
||||||
_get_comp_words_by_ref -n =: cur
|
|
||||||
case "$cur" in
|
|
||||||
*...*)
|
*...*)
|
||||||
pfx="${cur%...*}..."
|
pfx="${cur%...*}..."
|
||||||
cur="${cur#*...}"
|
cur="${cur#*...}"
|
||||||
@ -734,6 +726,17 @@ __git_complete_revlist ()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__git_complete_file ()
|
||||||
|
{
|
||||||
|
__git_complete_revlist_file
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_complete_revlist ()
|
||||||
|
{
|
||||||
|
__git_complete_revlist_file
|
||||||
|
}
|
||||||
|
|
||||||
__git_complete_remote_or_refspec ()
|
__git_complete_remote_or_refspec ()
|
||||||
{
|
{
|
||||||
local cur words cword
|
local cur words cword
|
||||||
@ -1356,7 +1359,7 @@ _git_diff ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
__git_complete_file
|
__git_complete_revlist_file
|
||||||
}
|
}
|
||||||
|
|
||||||
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
|
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
|
||||||
|
Loading…
Reference in New Issue
Block a user