set program name in cli.ts; set rome_dev env var in the dev-rome script itself
MODIFY
packages/@romejs/cli-flags/Parser.ts
packages/@romejs/cli-flags/Parser.ts
@@ -614,15 +614,15 @@ export default class Parser<T> {
await this.defineCommandFlags(command, consumer);
}
- const prg = process.env.ROME_DEV === '1' ? 'dev-rome' : 'rome';
+ const { programName } = this.opts;
switch (shell) {
case 'bash': {
- reporter.logAllNoMarkup(this.genBashCompletions(prg));
+ reporter.logAllNoMarkup(this.genBashCompletions(programName));
break;
}
case 'fish': {
- reporter.logAllNoMarkup(this.genFishCompletions(prg));
+ reporter.logAllNoMarkup(this.genFishCompletions(programName));
break;
}
}

MODIFY
packages/@romejs/cli/cli.ts
packages/@romejs/cli/cli.ts
@@ -48,7 +48,7 @@ type CLIFlags = {
export default async function cli() {
setProcessTitle('cli');
const p = parseCLIFlagsFromProcess({
- programName: 'rome',
+ programName: process.env.ROME_DEV === '1' ? 'dev-rome' : 'rome',
usage: '[command] [flags]',
version: VERSION,
defineFlags(

MODIFY
scripts/dev-rome
scripts/dev-rome
@@ -12,4 +12,5 @@ require('./_setup.cjs');
const {argv} = require('./_constants.cjs');
const {execDev} = require('./_utils.cjs');
+process.env.ROME_DEV = '1';
execDev(argv);

set program name in cli.ts; set rome_dev env var in the dev-rome script itself