From 2871096f9c87bc561de17e90939fa1727f6ce186 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 29 May 2016 13:58:26 +0200 Subject: git completions: Add general options These are the options between `git` and the subcommand. Fixes #3087. --- share/completions/git.fish | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'share') diff --git a/share/completions/git.fish b/share/completions/git.fish index 3f2a3b1c..dd3cc46b 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -205,6 +205,26 @@ end # general options complete -f -c git -l help -d 'Display the manual of a git command' +complete -f -c git -l version -d 'Display version' +complete -x -c git -s C -a '(__fish_complete_directories)' -d 'Run as if git was started in this directory' +complete -x -c git -s c -a '(command git config -l | string replace = \t)' -d 'Set a configuration option' +complete -x -c git -l exec-path -a '(__fish_git_complete_directories)' -d 'Get or set the path to the git programs' +complete -f -c git -l html-path -d 'Print the path to the html documentation' +complete -f -c git -l man-path -d 'Print the path to the man documentation' +complete -f -c git -l info-path -d 'Print the path to the info documentation' +complete -f -c git -s p -l paginate -d 'Pipe output into a pager' +complete -f -c git -l no-pager -d 'Do not pipe output into a pager' +complete -f -c git -l git-dir -d 'Set the path to the repository' +complete -f -c git -l work-tree -d 'Set the path to the working tree' +complete -f -c git -l namespace -d 'Set the namespace' +complete -f -c git -l bare -d 'Treat the repository as bare' +complete -f -c git -l no-replace-objects -d 'Do not use replacement refs to replace git objects' +complete -f -c git -l literal-pathspecs -d 'Treat pathspecs literally' +complete -f -c git -l glob-pathspecs -d 'Treat pathspecs as globs' +complete -f -c git -l noglob-pathspecs -d "Don't treat pathspecs as globs" +complete -f -c git -l icase-pathspecs -d 'Match pathspecs case-insensitively' + +# Options shared between multiple commands complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a 'oneline short medium full fuller email raw format:' #### fetch -- cgit v1.2.3