MCPcopy Index your code
hub / github.com/cli/cli / newSelectCmd

Function newSelectCmd

pkg/cmd/codespace/select.go:16–34  ·  view source on GitHub ↗
(app *App)

Source from the content-addressed store, hash-verified

14}
15
16func newSelectCmd(app *App) *cobra.Command {
17 var (
18 opts selectOptions
19 )
20
21 selectCmd := &cobra.Command{
22 Use: "select",
23 Short: "Select a Codespace",
24 Hidden: true,
25 Args: noArgsConstraint,
26 RunE: func(cmd *cobra.Command, args []string) error {
27 return app.Select(cmd.Context(), opts)
28 },
29 }
30
31 opts.selector = AddCodespaceSelector(selectCmd, app.apiClient)
32 selectCmd.Flags().StringVarP(&opts.filePath, "file", "f", "", "Output file path")
33 return selectCmd
34}
35
36// Hidden codespace `select` command allows to reuse existing codespace selection
37// dialog by external GH CLI extensions. By default output selected codespace name

Callers 1

NewCmdCodespaceFunction · 0.85

Calls 2

AddCodespaceSelectorFunction · 0.85
SelectMethod · 0.65

Tested by

no test coverage detected