-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2393 from carapace-sh/gh-updates-v2.50.0
gh: updates from v2.50.0
- Loading branch information
Showing
5 changed files
with
54 additions
and
2 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
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,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var variable_getCmd = &cobra.Command{ | ||
Use: "get <variable-name>", | ||
Short: "Get variables", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(variable_getCmd).Standalone() | ||
|
||
variable_getCmd.Flags().StringP("env", "e", "", "Get a variable for an environment") | ||
variable_getCmd.Flags().StringP("org", "o", "", "Get a variable for an organization") | ||
variableCmd.AddCommand(variable_getCmd) | ||
|
||
carapace.Gen(variable_setCmd).FlagCompletion(carapace.ActionMap{ | ||
"env": action.ActionEnvironments(variable_setCmd), | ||
"org": gh.ActionOrganizations(gh.HostOpts{}), | ||
}) | ||
|
||
carapace.Gen(variable_getCmd).PositionalCompletion( | ||
action.ActionVariables(variable_getCmd), | ||
) | ||
} |
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