Skip to content

Commit 3537d78

Browse files
authored
Merge pull request #3213 from carapace-sh/git-root-flags
git: added missing flags
2 parents 588dfa8 + b6ce527 commit 3537d78

File tree

1 file changed

+11
-3
lines changed
  • completers/common/git_completer/cmd

1 file changed

+11
-3
lines changed

completers/common/git_completer/cmd/root.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,36 @@ func init() {
5454

5555
carapace.Gen(rootCmd).Standalone()
5656
rootCmd.Flags().StringS("C", "C", "", "run as if git was started in given path")
57+
rootCmd.Flags().String("attr-source", "", "Read gitattributes from <tree-ish> instead of the worktree")
5758
rootCmd.Flags().Bool("bare", false, "use $PWD as repository")
5859
rootCmd.Flags().StringS("c", "c", "", "pass configuration parameter to command")
5960
rootCmd.Flags().StringArray("config-env", nil, "give configuration variable <name> a value")
6061
rootCmd.Flags().String("exec-path", "", "path containing core git-programs")
6162
rootCmd.Flags().String("git-dir", "", "path to repository")
62-
rootCmd.Flags().Bool("help", false, "display help message")
63+
rootCmd.Flags().Bool("glob-pathspecs", false, "Add \"glob\" magic to all pathspec")
64+
rootCmd.Flags().BoolP("help", "h", false, "display help message")
6365
rootCmd.Flags().Bool("html-path", false, "display path to HTML documentation and exit")
66+
rootCmd.Flags().Bool("icase-pathspecs", false, "Add \"icase\" magic to all pathspec")
6467
rootCmd.Flags().Bool("info-path", false, "print the path where the info files are installed and exit")
6568
rootCmd.Flags().String("list-cmds", "", "list commands")
6669
rootCmd.Flags().Bool("literal-pathspecs", false, "treat pathspecs literally, rather than as glob patterns")
6770
rootCmd.Flags().Bool("man-path", false, "print the manpath for the man pages for this version of Git and exit")
6871
rootCmd.Flags().String("namespace", "", "set the Git namespace")
72+
rootCmd.Flags().Bool("no-advise", false, "Disable all advice hints from being printed")
73+
rootCmd.Flags().Bool("no-lazy-fetch", false, "Do not fetch missing objects from the promisor remote on demand")
74+
rootCmd.Flags().Bool("no-optional-locks", false, "Do not perform optional operations that require locks")
6975
rootCmd.Flags().BoolP("no-pager", "P", false, "don't pipe git output into a pager")
7076
rootCmd.Flags().Bool("no-replace-objects", false, "do not use replacement refs to replace git objects")
77+
rootCmd.Flags().Bool("noglob-pathspecs", false, "Add \"literal\" magic to all pathspec")
7178
rootCmd.Flags().BoolP("paginate", "p", false, "pipe output into a pager")
72-
rootCmd.Flags().Bool("version", false, "display version information")
79+
rootCmd.Flags().BoolP("version", "v", false, "display version information")
7380
rootCmd.Flags().String("work-tree", "", "path to working tree")
7481

7582
rootCmd.Flag("list-cmds").NoOptDefVal = " "
7683

7784
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
78-
"C": carapace.ActionDirectories(),
85+
"C": carapace.ActionDirectories(),
86+
"attr-source": git.ActionRefs(git.RefOption{}.Default()),
7987
"c": carapace.ActionMultiParts("=", func(c carapace.Context) carapace.Action {
8088
switch len(c.Parts) {
8189
case 0:

0 commit comments

Comments
 (0)