From 3afd12ae9716b25ef03c768b270ea91e9202364f Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 28 Jul 2016 12:37:14 +0000 Subject: 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. --- Completion/Unix/Command/_git | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 8b78b5785..b16d2bc4c 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -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 -- cgit 1.4.1