mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: Improve coder list and show CLI help (#3167)
This commit is contained in:
committed by
GitHub
parent
233aa17848
commit
d7ec407a7c
@ -15,14 +15,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func list() *cobra.Command {
|
func list() *cobra.Command {
|
||||||
var (
|
var columns []string
|
||||||
columns []string
|
|
||||||
)
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Annotations: workspaceCommand,
|
Annotations: workspaceCommand,
|
||||||
Use: "list",
|
Use: "list",
|
||||||
Short: "List all workspaces",
|
Short: "List all workspaces",
|
||||||
Aliases: []string{"ls"},
|
Aliases: []string{"ls"},
|
||||||
|
Args: cobra.ExactArgs(0),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
client, err := createClient(cmd)
|
client, err := createClient(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
func show() *cobra.Command {
|
func show() *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Annotations: workspaceCommand,
|
Annotations: workspaceCommand,
|
||||||
Use: "show",
|
Use: "show <workspace>",
|
||||||
Short: "Show details of a workspace's resources and agents",
|
Short: "Show details of a workspace's resources and agents",
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
Reference in New Issue
Block a user