perf(cli): optimize CPU consumption of help pages (#9607)

This change reduces the CPU consumption of --help by ~50%.

Also, this change removes ANSI escape codes from our golden files. I
don't think those were worth the inability to parallelize golden file tests and
global state fragility.
This commit is contained in:
Ammar Bandukwala
2023-09-14 17:48:29 -07:00
committed by GitHub
parent 7311ffbd9d
commit b63dfe7b75
93 changed files with 854 additions and 828 deletions

View File

@ -1,6 +1,6 @@
coder v0.0.0-devel
USAGE:
USAGE:
coder config-ssh [flags]
Add an SSH Host entry for your workspaces "ssh coder.workspace"
@ -15,40 +15,40 @@ coder v0.0.0-devel
$ coder config-ssh --dry-run
OPTIONS:
--coder-binary-path string, $CODER_SSH_CONFIG_BINARY_PATH
OPTIONS:
--coder-binary-path string, $CODER_SSH_CONFIG_BINARY_PATH
Optionally specify the absolute path to the coder binary used in
ProxyCommand. By default, the binary invoking this command ('config
ssh') is used.
-n, --dry-run bool, $CODER_SSH_DRY_RUN
-n, --dry-run bool, $CODER_SSH_DRY_RUN
Perform a trial run with no changes made, showing a diff at the end.
--force-unix-filepaths bool, $CODER_CONFIGSSH_UNIX_FILEPATHS
--force-unix-filepaths bool, $CODER_CONFIGSSH_UNIX_FILEPATHS
By default, 'config-ssh' uses the os path separator when writing the
ssh config. This might be an issue in Windows machine that use a
unix-like shell. This flag forces the use of unix file paths (the
forward slash '/').
--ssh-config-file string, $CODER_SSH_CONFIG_FILE (default: ~/.ssh/config)
--ssh-config-file string, $CODER_SSH_CONFIG_FILE (default: ~/.ssh/config)
Specifies the path to an SSH config.
--ssh-host-prefix string, $CODER_CONFIGSSH_SSH_HOST_PREFIX
--ssh-host-prefix string, $CODER_CONFIGSSH_SSH_HOST_PREFIX
Override the default host prefix.
-o, --ssh-option string-array, $CODER_SSH_CONFIG_OPTS
-o, --ssh-option string-array, $CODER_SSH_CONFIG_OPTS
Specifies additional SSH options to embed in each host stanza.
--use-previous-options bool, $CODER_SSH_USE_PREVIOUS_OPTIONS
--use-previous-options bool, $CODER_SSH_USE_PREVIOUS_OPTIONS
Specifies whether or not to keep options from previous run of
config-ssh.
--wait yes|no|auto, $CODER_CONFIGSSH_WAIT (default: auto)
--wait yes|no|auto, $CODER_CONFIGSSH_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.
-y, --yes bool
-y, --yes bool
Bypass prompts.
———