Using new complete --keep-order option for __fish_git_recent_commits

The primary motivation for --keep-order for `complete` was to support
something like commit history completions, which are returned by git in
reverse chronological order and make no sense alphabetically (they are
SHA1 hashes).

See https://github.com/fish-shell/fish-shell/issues/361 for more info.
This commit is contained in:
Mahmoud Al-Qudsi 2017-07-24 17:55:49 -05:00 committed by Kurtis Rader
parent 94041974e4
commit 34c2bf0f55

View file

@ -427,7 +427,7 @@ complete -c git -n '__fish_git_needs_command' -a commit -d 'Record changes to th
complete -c git -n '__fish_git_using_command commit' -l amend -d 'Amend the log message of the last commit'
complete -f -c git -n '__fish_git_using_command commit' -a '(__fish_git_modified_files)'
complete -f -c git -n '__fish_git_using_command commit' -l fixup -d 'Fixup commit to be used with rebase --autosquash'
complete -f -c git -n '__fish_git_using_command commit; and __fish_contains_opt fixup' -a '(__fish_git_recent_commits)'
complete -f -c git -n '__fish_git_using_command commit; and __fish_contains_opt fixup' -k -a '(__fish_git_recent_commits)'
# TODO options
### diff