From 0accb92f1baf71d01f64703ad879d6994692217a Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Tue, 9 Jan 2024 14:17:51 +0100 Subject: [PATCH] docs: escape enum pipe --- cli/clibase/values.go | 2 +- docs/cli/config-ssh.md | 4 ++-- docs/cli/speedtest.md | 8 ++++---- docs/cli/ssh.md | 10 +++++----- docs/cli/stat_disk.md | 8 ++++---- docs/cli/stat_mem.md | 8 ++++---- docs/cli/templates_init.md | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cli/clibase/values.go b/cli/clibase/values.go index d390fe2f89bc6..8fb7b7ff227eb 100644 --- a/cli/clibase/values.go +++ b/cli/clibase/values.go @@ -484,7 +484,7 @@ func (e *Enum) Set(v string) error { } func (e *Enum) Type() string { - return fmt.Sprintf("enum[%v]", strings.Join(e.Choices, "|")) + return fmt.Sprintf("enum[%v]", strings.Join(e.Choices, "\\|")) } func (e *Enum) String() string { diff --git a/docs/cli/config-ssh.md b/docs/cli/config-ssh.md index 6fece81c58693..5f1261ff676d4 100644 --- a/docs/cli/config-ssh.md +++ b/docs/cli/config-ssh.md @@ -93,8 +93,8 @@ Specifies whether or not to keep options from previous run of config-ssh. ### --wait | | | -| ----------- | ---------------------------------- | --- | ------------ | -| Type | enum[yes | no | auto] | +| ----------- | ---------------------------------- | +| Type | enum[yes\|no\|auto] | | Environment | $CODER_CONFIGSSH_WAIT | | Default | auto | diff --git a/docs/cli/speedtest.md b/docs/cli/speedtest.md index d06cdd77367cd..0a351fde5d9df 100644 --- a/docs/cli/speedtest.md +++ b/docs/cli/speedtest.md @@ -22,10 +22,10 @@ Specifies whether to wait for a direct connection before testing speed. ### --direction -| | | -| ------- | ----------------- | ------------ | -| Type | enum[up | down] | -| Default | down | +| | | +| ------- | --------------------------- | +| Type | enum[up\|down] | +| Default | down | Specifies whether to run in reverse mode where the client receives and the server sends. diff --git a/docs/cli/ssh.md b/docs/cli/ssh.md index 264b36a89583d..b3416f3307950 100644 --- a/docs/cli/ssh.md +++ b/docs/cli/ssh.md @@ -87,11 +87,11 @@ Specifies whether to emit SSH output over stdin/stdout. ### --wait -| | | -| ----------- | ---------------------------- | --- | ------------ | -| Type | enum[yes | no | auto] | -| Environment | $CODER_SSH_WAIT | -| Default | auto | +| | | +| ----------- | -------------------------------- | +| Type | enum[yes\|no\|auto] | +| Environment | $CODER_SSH_WAIT | +| Default | auto | Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used. diff --git a/docs/cli/stat_disk.md b/docs/cli/stat_disk.md index be4e8a429e6b2..8585f6faa5a3e 100644 --- a/docs/cli/stat_disk.md +++ b/docs/cli/stat_disk.md @@ -32,9 +32,9 @@ Path for which to check disk usage. ### --prefix -| | | -| ------- | --------------- | --- | --- | ---------- | -| Type | enum[Ki | Mi | Gi | Ti] | -| Default | Gi | +| | | +| ------- | --------------------------------- | +| Type | enum[Ki\|Mi\|Gi\|Ti] | +| Default | Gi | SI Prefix for disk measurement. diff --git a/docs/cli/stat_mem.md b/docs/cli/stat_mem.md index f76e2901f9d13..6594316753c30 100644 --- a/docs/cli/stat_mem.md +++ b/docs/cli/stat_mem.md @@ -31,9 +31,9 @@ Output format. Available formats: text, json. ### --prefix -| | | -| ------- | --------------- | --- | --- | ---------- | -| Type | enum[Ki | Mi | Gi | Ti] | -| Default | Gi | +| | | +| ------- | --------------------------------- | +| Type | enum[Ki\|Mi\|Gi\|Ti] | +| Default | Gi | SI Prefix for memory measurement. diff --git a/docs/cli/templates_init.md b/docs/cli/templates_init.md index d26a8cb857f81..06b4c849f4698 100644 --- a/docs/cli/templates_init.md +++ b/docs/cli/templates_init.md @@ -14,8 +14,8 @@ coder templates init [flags] [directory] ### --id -| | | -| ---- | --------------------------- | --------- | ----------- | ----------- | -------- | ------ | ---------------- | --------- | ---------------- | ----------- | ---------- | -------------------- | -| Type | enum[aws-devcontainer | aws-linux | aws-windows | azure-linux | do-linux | docker | gcp-devcontainer | gcp-linux | gcp-vm-container | gcp-windows | kubernetes | nomad-docker] | +| | | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Type | enum[aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|do-linux\|docker\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|nomad-docker] | Specify a given example template by ID.