feat(cli): add shell completions (#14341)

This commit is contained in:
Ethan
2024-08-20 14:47:46 +10:00
committed by GitHub
parent 6f9b3c1592
commit 0b2ba96065
80 changed files with 510 additions and 418 deletions
+2
View File
@@ -15,6 +15,8 @@ USAGE:
SUBCOMMANDS:
autoupdate Toggle auto-update policy for a workspace
completion Install or update shell completion scripts for the
detected or chosen shell.
config-ssh Add an SSH Host entry for your workspaces "ssh
coder.workspace"
create Create a workspace
+16
View File
@@ -0,0 +1,16 @@
coder v0.0.0-devel
USAGE:
coder completion [flags]
Install or update shell completion scripts for the detected or chosen shell.
OPTIONS:
-p, --print bool
Print the completion script instead of installing it.
-s, --shell bash|fish|zsh|powershell
The shell to install completion for.
———
Run `coder --help` for a list of global options.
+4 -7
View File
@@ -11,14 +11,11 @@ OPTIONS:
-a, --all bool
Specifies whether all workspaces will be listed or not.
-c, --column string-array (default: workspace,template,status,healthy,last built,current version,outdated,starts at,stops after)
Columns to display in table output. Available columns: favorite,
workspace, organization id, organization name, template, status,
healthy, last built, current version, outdated, starts at, starts
next, stops after, stops next, daily cost.
-c, --column [favorite|workspace|organization id|organization name|template|status|healthy|last built|current version|outdated|starts at|starts next|stops after|stops next|daily cost] (default: workspace,template,status,healthy,last built,current version,outdated,starts at,stops after)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
--search string (default: owner:me)
Search for a workspace with a query.
+4 -5
View File
@@ -15,12 +15,11 @@ OPTIONS:
-a, --all bool
Specifies whether all workspaces will be listed or not.
-c, --column string-array (default: workspace,starts at,starts next,stops after,stops next)
Columns to display in table output. Available columns: workspace,
starts at, starts next, stops after, stops next.
-c, --column [workspace|starts at|starts next|stops after|stops next] (default: workspace,starts at,starts next,stops after,stops next)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
--search string (default: owner:me)
Search for a workspace with a query.
+4 -5
View File
@@ -6,9 +6,8 @@ USAGE:
Run upload and download tests from your machine to a workspace
OPTIONS:
-c, --column string-array (default: Interval,Throughput)
Columns to display in table output. Available columns: Interval,
Throughput.
-c, --column [Interval|Throughput] (default: Interval,Throughput)
Columns to display in table output.
-d, --direct bool
Specifies whether to wait for a direct connection before testing
@@ -18,8 +17,8 @@ OPTIONS:
Specifies whether to run in reverse mode where the client receives and
the server sends.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
--pcap-file string
Specifies a file to write a network capture to.
+4 -5
View File
@@ -11,12 +11,11 @@ SUBCOMMANDS:
mem Show memory usage, in gigabytes.
OPTIONS:
-c, --column string-array (default: host_cpu,host_memory,home_disk,container_cpu,container_memory)
Columns to display in table output. Available columns: host cpu, host
memory, home disk, container cpu, container memory.
-c, --column [host cpu|host memory|home disk|container cpu|container memory] (default: host cpu,host memory,home disk,container cpu,container memory)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+2 -2
View File
@@ -9,8 +9,8 @@ OPTIONS:
--host bool
Force host CPU measurement.
-o, --output string (default: text)
Output format. Available formats: text, json.
-o, --output text|json (default: text)
Output format.
———
Run `coder --help` for a list of global options.
+2 -2
View File
@@ -6,8 +6,8 @@ USAGE:
Show disk usage, in gigabytes.
OPTIONS:
-o, --output string (default: text)
Output format. Available formats: text, json.
-o, --output text|json (default: text)
Output format.
--path string (default: /)
Path for which to check disk usage.
+2 -2
View File
@@ -9,8 +9,8 @@ OPTIONS:
--host bool
Force host memory measurement.
-o, --output string (default: text)
Output format. Available formats: text, json.
-o, --output text|json (default: text)
Output format.
--prefix Ki|Mi|Gi|Ti (default: Gi)
SI Prefix for memory measurement.
+2 -2
View File
@@ -25,13 +25,13 @@ OPTIONS:
--allow-user-cancel-workspace-jobs bool (default: true)
Allow users to cancel in-progress workspace jobs.
--autostart-requirement-weekdays string-array
--autostart-requirement-weekdays [monday|tuesday|wednesday|thursday|friday|saturday|sunday|all]
Edit the template autostart requirement weekdays - workspaces created
from this template can only autostart on the given weekdays. To unset
this value for the template (and allow autostart on all days), pass
'all'.
--autostop-requirement-weekdays string-array
--autostop-requirement-weekdays [monday|tuesday|wednesday|thursday|friday|saturday|sunday|none]
Edit the template autostop requirement weekdays - workspaces created
from this template must be restarted on the given weekdays. To unset
this value for the template (and disable the autostop requirement for
+4 -6
View File
@@ -8,13 +8,11 @@ USAGE:
Aliases: ls
OPTIONS:
-c, --column string-array (default: name,organization name,last updated,used by)
Columns to display in table output. Available columns: name, created
at, last updated, organization id, organization name, provisioner,
active version id, used by, default ttl.
-c, --column [name|created at|last updated|organization id|organization name|provisioner|active version id|used by|default ttl] (default: name,organization name,last updated,used by)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+4 -5
View File
@@ -9,15 +9,14 @@ OPTIONS:
-O, --org string, $CODER_ORGANIZATION
Select which organization (uuid or name) to use.
-c, --column string-array (default: Name,Created At,Created By,Status,Active)
Columns to display in table output. Available columns: name, created
at, created by, status, active, archived.
-c, --column [name|created at|created by|status|active|archived] (default: name,created at,created by,status,active)
Columns to display in table output.
--include-archived bool
Include archived versions in the result list.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+4 -5
View File
@@ -12,12 +12,11 @@ OPTIONS:
Specifies whether all users' tokens will be listed or not (must have
Owner role to see all tokens).
-c, --column string-array (default: id,name,last used,expires at,created at)
Columns to display in table output. Available columns: id, name, last
used, expires at, created at, owner.
-c, --column [id|name|last used|expires at|created at|owner] (default: id,name,last used,expires at,created at)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+1 -1
View File
@@ -11,7 +11,7 @@ USAGE:
$ coder users activate example_user
OPTIONS:
-c, --column string-array (default: username,email,created_at,status)
-c, --column [username|email|created at|status] (default: username,email,created at,status)
Specify a column to filter in the table.
———
+4 -5
View File
@@ -6,12 +6,11 @@ USAGE:
Aliases: ls
OPTIONS:
-c, --column string-array (default: username,email,created_at,status)
Columns to display in table output. Available columns: id, username,
email, created at, updated at, status.
-c, --column [id|username|email|created at|updated at|status] (default: username,email,created at,status)
Columns to display in table output.
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+2 -2
View File
@@ -8,8 +8,8 @@ USAGE:
$ coder users show me
OPTIONS:
-o, --output string (default: table)
Output format. Available formats: table, json.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.
+1 -1
View File
@@ -9,7 +9,7 @@ USAGE:
$ coder users suspend example_user
OPTIONS:
-c, --column string-array (default: username,email,created_at,status)
-c, --column [username|email|created at|status] (default: username,email,created at,status)
Specify a column to filter in the table.
———
+2 -2
View File
@@ -6,8 +6,8 @@ USAGE:
Show coder version
OPTIONS:
-o, --output string (default: text)
Output format. Available formats: text, json.
-o, --output text|json (default: text)
Output format.
———
Run `coder --help` for a list of global options.