Skip to content

Commit 0caa9f6

Browse files
committed
refactor(cli): shorten the folder shortcut comments to fit the comment ratchet
1 parent bf21873 commit 0caa9f6

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

‎packages/cli/src/utils/projectShortcut.ts‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import { statSync } from "node:fs";
22
import { resolve } from "node:path";
33

4-
/**
5-
* Where the root command word sits in argv, or -1. The root has no value-taking options: Citty
6-
* skips flags up to the first positional and stops subcommand selection at the -- separator.
7-
*/
4+
/** Index of the root command word (first non-flag before `--`), or -1; the root has no value-taking options. */
85
export function commandWordIndex(argv: readonly string[]): number {
96
const end = argv.indexOf("--");
107
const index = argv.findIndex((arg) => !arg.startsWith("-"));
118
return end >= 0 && index >= end ? -1 : index;
129
}
1310

14-
/**
15-
* `hyperframes <dir>` is `hyperframes open <dir>`. A known command always wins, even over a
16-
* folder with its name; any other command word must be an existing directory to count as a project.
17-
*/
11+
/** `hyperframes <dir>` is `hyperframes open <dir>`; a known command wins over a folder of the same name. */
1812
export function openShortcutArgv(
1913
argv: readonly string[],
2014
commands: ReadonlySet<string>,

0 commit comments

Comments
 (0)