Skip to content

Commit 5b0cbd7

Browse files
committed
gh: updates from v2.59.0
1 parent 0f40dfe commit 5b0cbd7

File tree

7 files changed

+125
-0
lines changed

7 files changed

+125
-0
lines changed

completers/gh_completer/cmd/gist_list.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ var gist_listCmd = &cobra.Command{
1515
func init() {
1616
carapace.Gen(gist_listCmd).Standalone()
1717

18+
gist_listCmd.Flags().String("filter", "", "Filter gists using a regular `expression`")
19+
gist_listCmd.Flags().Bool("include-content", false, "Include gists' file content when filtering")
1820
gist_listCmd.Flags().StringP("limit", "L", "", "Maximum number of gists to fetch")
1921
gist_listCmd.Flags().Bool("public", false, "Show only public gists")
2022
gist_listCmd.Flags().Bool("secret", false, "Show only secret gists")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var repo_gitignoreCmd = &cobra.Command{
9+
Use: "gitignore <command>",
10+
Short: "List and view available repository gitignore templates",
11+
GroupID: "Targeted commands",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_gitignoreCmd).Standalone()
17+
18+
repoCmd.AddCommand(repo_gitignoreCmd)
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var repo_gitignore_listCmd = &cobra.Command{
9+
Use: "list",
10+
Short: "List available repository gitignore templates",
11+
Aliases: []string{"ls"},
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_gitignore_listCmd).Standalone()
17+
18+
repo_gitignoreCmd.AddCommand(repo_gitignore_listCmd)
19+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var repo_gitignore_viewCmd = &cobra.Command{
10+
Use: "view <template>",
11+
Short: "View an available repository gitignore template",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_gitignore_viewCmd).Standalone()
17+
18+
repo_gitignoreCmd.AddCommand(repo_gitignore_viewCmd)
19+
20+
carapace.Gen(repo_gitignore_viewCmd).PositionalCompletion(
21+
action.ActionGitignoreTemplates(repo_gitignore_viewCmd),
22+
)
23+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var repo_licenseCmd = &cobra.Command{
9+
Use: "license <command>",
10+
Short: "Explore repository licenses",
11+
GroupID: "Targeted commands",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_licenseCmd).Standalone()
17+
18+
repoCmd.AddCommand(repo_licenseCmd)
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var repo_license_listCmd = &cobra.Command{
9+
Use: "list",
10+
Short: "List common repository licenses",
11+
Aliases: []string{"ls"},
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_license_listCmd).Standalone()
17+
18+
repo_licenseCmd.AddCommand(repo_license_listCmd)
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var repo_license_viewCmd = &cobra.Command{
10+
Use: "view {<license-key> | <SPDX-ID>}",
11+
Short: "View a specific repository license",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(repo_license_viewCmd).Standalone()
17+
18+
repo_license_viewCmd.Flags().BoolP("web", "w", false, "Open https://choosealicense.com/ in the browser")
19+
repo_licenseCmd.AddCommand(repo_license_viewCmd)
20+
21+
carapace.Gen(repo_license_viewCmd).PositionalCompletion(
22+
gh.ActionLicenses(gh.HostOpts{}),
23+
)
24+
}

0 commit comments

Comments
 (0)