A thought: since Rome already generates help information from a centralized list of commands/descriptions it wouldn't be that too much of a leap to auto-generate shell completions.
Here's a rudimentary example for the fish-shell (there's probably a much more efficient implementation).
import {masterCommands} from '...';
output = "";
for(let key of Array.from(masterCommands.keys())) {
const command = masterCommands.get(key);
output += `complete -f -c rome -n __fish_use_subcommand -a ${key} -d '${command.description}'`
}
// Write output to file
Good idea! I just opened #348 which adds the relevant hooks and instructions to the @romejs/cli-flags, that way there's access to all command and flag information. It will also then just automatically work if we use that module elsewhere, or make it available third-party.
Let me know if you want to have a go at implementing it. I use fish shell too so happy to test out any changes. Feel free to ping me in our Discord if you need any help (or on the issue or linked PR).
We can have instructions to add rome --generate-autocomplete fish or something and eval it in your shell profile, or maybe prebuild it for every release and distribute it.
I've made a start with the fish completions:

Looks like I can close this out due to #403. Thank you @1ntEgr8 for the PR, and thanks @danteissaias for raising this!
Most helpful comment
I've made a start with the fish completions: