From 50ed5126f1185e317b91bf265d0d1282dcd35af4 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 10 May 2019 15:36:41 +0200 Subject: [PATCH] completions/git: Reorder some completions with --keep-order They are displayed in LIFO-order, so it makes sense to e.g. put the recent commits close to last (only before files) for `checkout`. Fixes #5868. --- share/completions/git.fish | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index eecc06e77..436e7fa4d 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -894,11 +894,11 @@ complete -f -c git -n '__fish_git_using_command add' -a '(__fish_git_files modif ### checkout complete -f -c git -n '__fish_git_needs_command' -a checkout -d 'Checkout and switch to a branch' -complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_recent_commits)' -complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_branches)' -complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_heads)' -d 'Head' complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_tags)' -d 'Tag' +complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_heads)' -d 'Head' +complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_branches)' complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch' +complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -op)' -a '(__fish_git_recent_commits)' complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_files modified deleted)' complete -f -c git -n '__fish_git_using_command checkout' -s b -d 'Create a new branch' complete -f -c git -n '__fish_git_using_command checkout' -s t -l track -d 'Track a new branch' @@ -966,10 +966,10 @@ complete -f -c git -n '__fish_git_using_command commit; and __fish_contains_opt ### describe complete -c git -n '__fish_git_needs_command' -a describe -d 'Give an object a human readable name based on an available ref' -complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_branches)' -complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_heads)' -d 'Head' complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_tags)' -d 'Tag' +complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_branches)' complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch' +complete -k -f -c git -n '__fish_git_using_command describe' -a '(__fish_git_heads)' -d 'Head' complete -f -c git -n '__fish_git_using_command describe' -l dirty -d 'Describe the state of the working tree, append dirty if there are local changes' complete -f -c git -n '__fish_git_using_command describe' -l broken -d 'Describe the state of the working tree, append -broken instead of erroring' complete -f -c git -n '__fish_git_using_command describe' -l all -d 'Use all tags, not just annotated'