Skip to content

Commit 04e4542

Browse files
committed
gh: updates from v2.29.0
1 parent 472005a commit 04e4542

18 files changed

+141
-28
lines changed
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/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var alias_importCmd = &cobra.Command{
9+
Use: "import [<filename> | -]",
10+
Short: "Import aliases from a YAML file",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(alias_importCmd).Standalone()
16+
17+
alias_importCmd.Flags().Bool("clobber", false, "Overwrite existing aliases of the same name")
18+
aliasCmd.AddCommand(alias_importCmd)
19+
20+
carapace.Gen(alias_importCmd).PositionalCompletion(
21+
carapace.ActionFiles(),
22+
)
23+
}

completers/gh_completer/cmd/auth_login.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ func init() {
1919
auth_loginCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitHub instance to authenticate with")
2020
auth_loginCmd.Flags().Bool("insecure-storage", false, "Save authentication credentials in plain text instead of credential store")
2121
auth_loginCmd.Flags().StringSliceP("scopes", "s", []string{}, "Additional authentication scopes to request")
22-
auth_loginCmd.Flags().Bool("secure-storage", false, "Save authentication credentials in secure credential store")
2322
auth_loginCmd.Flags().BoolP("web", "w", false, "Open a browser to authenticate")
2423
auth_loginCmd.Flags().Bool("with-token", false, "Read token from standard input")
2524
authCmd.AddCommand(auth_loginCmd)

completers/gh_completer/cmd/auth_refresh.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func init() {
1818
auth_refreshCmd.Flags().StringP("hostname", "h", "", "The GitHub host to use for authentication")
1919
auth_refreshCmd.Flags().Bool("insecure-storage", false, "Save authentication credentials in plain text instead of credential store")
2020
auth_refreshCmd.Flags().StringSliceP("scopes", "s", []string{}, "Additional authentication scopes for gh to have")
21-
auth_refreshCmd.Flags().Bool("secure-storage", false, "Save authentication credentials in secure credential store")
2221
authCmd.AddCommand(auth_refreshCmd)
2322

2423
carapace.Gen(auth_refreshCmd).FlagCompletion(carapace.ActionMap{

completers/gh_completer/cmd/auth_token.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func init() {
1616
carapace.Gen(auth_tokenCmd).Standalone()
1717

1818
auth_tokenCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitHub instance authenticated with")
19-
auth_tokenCmd.Flags().Bool("secure-storage", false, "Search only secure credential store for authentication token")
2019
authCmd.AddCommand(auth_tokenCmd)
2120

2221
carapace.Gen(auth_tokenCmd).FlagCompletion(carapace.ActionMap{

completers/gh_completer/cmd/codespace_code.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ func init() {
1919
codespace_codeCmd.PersistentFlags().StringP("codespace", "c", "", "Name of the codespace")
2020
codespace_codeCmd.Flags().Bool("insiders", false, "Use the insiders version of Visual Studio Code")
2121
codespace_codeCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
22+
codespace_codeCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2223
codespace_codeCmd.Flags().BoolP("web", "w", false, "Use the web version of Visual Studio Code")
2324
codespaceCmd.AddCommand(codespace_codeCmd)
2425

2526
carapace.Gen(codespace_codeCmd).FlagCompletion(carapace.ActionMap{
26-
"codespace": action.ActionCodespaces(),
27-
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
27+
"codespace": action.ActionCodespaces(),
28+
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
29+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
2830
})
2931
}

completers/gh_completer/cmd/codespace_cp.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ func init() {
2424
codespace_cpCmd.Flags().StringP("profile", "p", "", "Name of the SSH profile to use")
2525
codespace_cpCmd.Flags().BoolP("recursive", "r", false, "Recursively copy directories")
2626
codespace_cpCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
27+
codespace_cpCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2728
codespaceCmd.AddCommand(codespace_cpCmd)
2829

2930
// TODO profile completion
3031
carapace.Gen(codespace_cpCmd).FlagCompletion(carapace.ActionMap{
31-
"codespace": action.ActionCodespaces(),
32-
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
32+
"codespace": action.ActionCodespaces(),
33+
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
34+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
3335
})
3436

3537
carapace.Gen(codespace_cpCmd).PositionalAnyCompletion(

completers/gh_completer/cmd/codespace_delete.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ func init() {
2222
codespace_deleteCmd.Flags().BoolP("force", "f", false, "Skip confirmation for codespaces that contain unsaved changes")
2323
codespace_deleteCmd.Flags().StringP("org", "o", "", "The `login` handle of the organization (admin-only)")
2424
codespace_deleteCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
25-
codespace_deleteCmd.Flags().StringP("repo-deprecated", "r", "", "(Deprecated) Shorthand for --repo")
25+
codespace_deleteCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2626
codespace_deleteCmd.Flags().StringP("user", "u", "", "The `username` to delete codespaces for (used with --org)")
2727
codespaceCmd.AddCommand(codespace_deleteCmd)
2828

2929
carapace.Gen(codespace_deleteCmd).FlagCompletion(carapace.ActionMap{
30-
"codespace": action.ActionCodespaces(),
31-
"org": gh.ActionOrganizations(gh.HostOpts{}),
32-
"repo": action.ActionOwnerRepositories(codespace_deleteCmd),
33-
"user": gh.ActionUsers(gh.HostOpts{}),
30+
"codespace": action.ActionCodespaces(),
31+
"org": gh.ActionOrganizations(gh.HostOpts{}),
32+
"repo": action.ActionOwnerRepositories(codespace_deleteCmd),
33+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
34+
"user": gh.ActionUsers(gh.HostOpts{}),
3435
})
3536
}

completers/gh_completer/cmd/codespace_edit.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ func init() {
2020
codespace_editCmd.Flags().StringP("display-name", "d", "", "Set the display name")
2121
codespace_editCmd.Flags().StringP("machine", "m", "", "Set hardware specifications for the VM")
2222
codespace_editCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
23+
codespace_editCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2324
codespaceCmd.AddCommand(codespace_editCmd)
2425

2526
carapace.Gen(codespace_editCmd).FlagCompletion(carapace.ActionMap{
26-
"codespace": action.ActionCodespaces(),
27-
"machine": action.ActionCodespaceMachines(),
28-
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
27+
"codespace": action.ActionCodespaces(),
28+
"machine": action.ActionCodespaceMachines(),
29+
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
30+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
2931
})
3032
}

completers/gh_completer/cmd/codespace_jupyter.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ func init() {
1818

1919
codespace_jupyterCmd.PersistentFlags().StringP("codespace", "c", "", "Name of the codespace")
2020
codespace_jupyterCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
21+
codespace_jupyterCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2122
codespaceCmd.AddCommand(codespace_jupyterCmd)
2223

2324
carapace.Gen(codespace_jupyterCmd).FlagCompletion(carapace.ActionMap{
24-
"codespace": action.ActionCodespaces(),
25-
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
25+
"codespace": action.ActionCodespaces(),
26+
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
27+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
2628
})
2729
}

completers/gh_completer/cmd/codespace_logs.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ func init() {
1919
codespace_logsCmd.PersistentFlags().StringP("codespace", "c", "", "Name of the codespace")
2020
codespace_logsCmd.Flags().BoolP("follow", "f", false, "Tail and follow the logs")
2121
codespace_logsCmd.PersistentFlags().StringP("repo", "R", "", "Filter codespace selection by repository name (user/repo)")
22+
codespace_logsCmd.PersistentFlags().String("repo-owner", "", "Filter codespace selection by repository owner (username or org)")
2223
codespaceCmd.AddCommand(codespace_logsCmd)
2324

2425
carapace.Gen(codespace_logsCmd).FlagCompletion(carapace.ActionMap{
25-
"codespace": action.ActionCodespaces(),
26-
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
26+
"codespace": action.ActionCodespaces(),
27+
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
28+
"repo-owner": gh.ActionOwners(gh.HostOpts{}),
2729
})
2830
}

0 commit comments

Comments
 (0)