-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_gitignoreCmd = &cobra.Command{ | ||
Use: "gitignore <command>", | ||
Short: "List and view available repository gitignore templates", | ||
GroupID: "Targeted commands", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_gitignoreCmd).Standalone() | ||
|
||
repoCmd.AddCommand(repo_gitignoreCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_gitignore_listCmd = &cobra.Command{ | ||
Use: "list", | ||
Short: "List available repository gitignore templates", | ||
Aliases: []string{"ls"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_gitignore_listCmd).Standalone() | ||
|
||
repo_gitignoreCmd.AddCommand(repo_gitignore_listCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_gitignore_viewCmd = &cobra.Command{ | ||
Use: "view <template>", | ||
Short: "View an available repository gitignore template", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_gitignore_viewCmd).Standalone() | ||
|
||
repo_gitignoreCmd.AddCommand(repo_gitignore_viewCmd) | ||
|
||
carapace.Gen(repo_gitignore_viewCmd).PositionalCompletion( | ||
action.ActionGitignoreTemplates(repo_gitignore_viewCmd), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_licenseCmd = &cobra.Command{ | ||
Use: "license <command>", | ||
Short: "Explore repository licenses", | ||
GroupID: "Targeted commands", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_licenseCmd).Standalone() | ||
|
||
repoCmd.AddCommand(repo_licenseCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_license_listCmd = &cobra.Command{ | ||
Use: "list", | ||
Short: "List common repository licenses", | ||
Aliases: []string{"ls"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_license_listCmd).Standalone() | ||
|
||
repo_licenseCmd.AddCommand(repo_license_listCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var repo_license_viewCmd = &cobra.Command{ | ||
Use: "view {<license-key> | <SPDX-ID>}", | ||
Short: "View a specific repository license", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(repo_license_viewCmd).Standalone() | ||
|
||
repo_license_viewCmd.Flags().BoolP("web", "w", false, "Open https://choosealicense.com/ in the browser") | ||
repo_licenseCmd.AddCommand(repo_license_viewCmd) | ||
|
||
carapace.Gen(repo_license_viewCmd).PositionalCompletion( | ||
gh.ActionLicenses(gh.HostOpts{}), | ||
) | ||
} |