Hide -coder-bind for now

This commit is contained in:
Anmol Sethi 2020-10-09 07:38:38 -04:00
parent febf4ead96
commit f5489cd3a0
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB

View File

@ -65,6 +65,11 @@ interface Option<T> {
* Description of the option. Leave blank to hide the option. * Description of the option. Leave blank to hide the option.
*/ */
description?: string description?: string
/**
* Whether to print this option in --help output
*/
hidden?: boolean
} }
type OptionType<T> = T extends boolean type OptionType<T> = T extends boolean
@ -166,6 +171,7 @@ const options: Options<Required<Args>> = {
https://myname.coder-cloud.com at which you can easily access your code-server instance. https://myname.coder-cloud.com at which you can easily access your code-server instance.
Authorization is done via GitHub. Authorization is done via GitHub.
`, `,
hidden: true,
}, },
} }
@ -178,7 +184,7 @@ export const optionDescriptions = (): string[] => {
}), }),
{ short: 0, long: 0 }, { short: 0, long: 0 },
) )
return entries.map(([k, v]) => { return entries.filter(([_, v]) => !v.hidden).map(([k, v]) => {
const help = `${" ".repeat(widths.short - (v.short ? v.short.length : 0))}${v.short ? `-${v.short}` : " "} --${k} ` const help = `${" ".repeat(widths.short - (v.short ? v.short.length : 0))}${v.short ? `-${v.short}` : " "} --${k} `
return ( return (
help + help +