From 7aaf897a722d6c351c2c71a22a77c0cfd753bf7c Mon Sep 17 00:00:00 2001 From: Ron Gebauer Date: Tue, 12 Dec 2017 22:16:43 +0100 Subject: [PATCH] Add modified completion for git diff (#4592) * Add modified completion for git diff * Add modified completion for git diff --- CHANGELOG.md | 2 +- share/completions/git.fish | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 285a7aaf4..aee486dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ This section is for changes merged to the `major` branch that are not also merge - `bd` (#4472) - `jhipster` (#4472) - Improved completions for - - `git` (#4395, #4396) + - `git` (#4395, #4396, #4592) -- diff --git a/share/completions/git.fish b/share/completions/git.fish index f351f5290..4cdeb1038 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -446,12 +446,14 @@ complete -c git -n '__fish_git_needs_command' -a diff -d 'Show changes between c complete -c git -n '__fish_git_using_command diff' -a '(__fish_git_ranges)' -d 'Branch' complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index' complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem' +complete -f -c git -n '__fish_git_using_command diff' -a '(__fish_git_modified_files)' -d 'File' # TODO options ### difftool complete -c git -n '__fish_git_needs_command' -a difftool -d 'Open diffs in a visual tool' complete -c git -n '__fish_git_using_command difftool' -a '(__fish_git_ranges)' -d 'Branch' complete -c git -n '__fish_git_using_command difftool' -l cached -d 'Visually show diff of changes in the index' +complete -f -c git -n '__fish_git_using_command difftool' -a '(__fish_git_modified_files)' -d 'File' # TODO options