Use full terminal width for `--help` (#3515)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Pascal Birchler 2025-07-09 09:02:59 +02:00 committed by GitHub
parent d094026b3b
commit 8f2da86aa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -56,7 +56,7 @@ interface CliArgs {
} }
async function parseArguments(): Promise<CliArgs> { async function parseArguments(): Promise<CliArgs> {
const argv = await yargs(hideBin(process.argv)) const yargsInstance = yargs(hideBin(process.argv))
.scriptName('gemini') .scriptName('gemini')
.usage( .usage(
'$0 [options]', '$0 [options]',
@ -171,9 +171,11 @@ async function parseArguments(): Promise<CliArgs> {
.alias('v', 'version') .alias('v', 'version')
.help() .help()
.alias('h', 'help') .alias('h', 'help')
.strict().argv; .strict();
return argv; yargsInstance.wrap(yargsInstance.terminalWidth());
return yargsInstance.argv;
} }
// This function is now a thin wrapper around the server's implementation. // This function is now a thin wrapper around the server's implementation.