From 2f65e6f741e37947385959ecd144928735f50f22 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Tue, 21 Jan 2025 15:57:41 +0800 Subject: [PATCH] bin/cpubench: add option aliases --- src/bin/cpubench.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/cpubench.ts b/src/bin/cpubench.ts index 9c974c1..6f2ad65 100644 --- a/src/bin/cpubench.ts +++ b/src/bin/cpubench.ts @@ -27,6 +27,7 @@ const argv = await yargs(hideBin(process.argv)) demandOption: true }) .option('optimize', { + alias: 'o', type: 'string', description: 'Optimization level', choices: ['0', '1', '2', '3', 's', 'fast', 'g', 'z'], // 限制输入值为合法选项 @@ -34,6 +35,7 @@ const argv = await yargs(hideBin(process.argv)) }) .option('benchmarks', { type: 'array', // 数组类型参数 + alias: 'b', description: 'List of benchmarks to run', demandOption: true, })