(app *App)
| 14 | } |
| 15 | |
| 16 | func 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 |
no test coverage detected