mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 16:40:24 +02:00
40493/0002: _git-checkout: Reorder default completions.
The unprefixed name of a remote branch is used to create a new local remote-tracking branch; that is presumed to be a rarer operation than either switching among local branches or reverting to the index version of a modified file. Between the remaining two, put modified files before tree-ishes because there are generally few of the former and many of the latter.
This commit is contained in:
parent
4da5c23dce
commit
3afd12ae97
2 changed files with 8 additions and 2 deletions
|
@ -486,9 +486,10 @@ _git-checkout () {
|
|||
_alternative $tree_ish_arg $file_arg && ret=0
|
||||
else
|
||||
_alternative \
|
||||
$remote_branch_noprefix_arg \
|
||||
$file_arg \
|
||||
$tree_ish_arg \
|
||||
$file_arg && ret=0
|
||||
$remote_branch_noprefix_arg \
|
||||
&& ret=0
|
||||
fi
|
||||
|
||||
elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan|--detach]} ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue