diff --git a/completers/jj_completer/cmd/git_clone.go b/completers/jj_completer/cmd/git_clone.go index d1525d877c..629ae0c6f1 100644 --- a/completers/jj_completer/cmd/git_clone.go +++ b/completers/jj_completer/cmd/git_clone.go @@ -2,11 +2,12 @@ package cmd import ( "github.com/rsteube/carapace" + "github.com/rsteube/carapace-bin/pkg/actions/tools/git" "github.com/spf13/cobra" ) var git_cloneCmd = &cobra.Command{ - Use: "clone", + Use: "clone [OPTIONS] [DESTINATION]", Short: "Create a new repo backed by a clone of a Git repo", Run: func(cmd *cobra.Command, args []string) {}, } @@ -17,4 +18,9 @@ func init() { git_cloneCmd.Flags().Bool("colocate", false, "Whether or not to colocate the Jujutsu repo with the git repo") git_cloneCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") gitCmd.AddCommand(git_cloneCmd) + + carapace.Gen(git_cloneCmd).PositionalCompletion( + git.ActionRepositorySearch(git.SearchOpts{}.Default()), + carapace.ActionDirectories(), + ) } diff --git a/completers/jj_completer/cmd/root.go b/completers/jj_completer/cmd/root.go index 5f692b2ff0..451e430193 100644 --- a/completers/jj_completer/cmd/root.go +++ b/completers/jj_completer/cmd/root.go @@ -11,6 +11,7 @@ import ( var rootCmd = &cobra.Command{ Use: "jj", Short: "Jujutsu (An experimental VCS)", + Long: "https://github.com/martinvonz/jj", Run: func(cmd *cobra.Command, args []string) {}, }