Open d-fischer opened 2 years ago
If you define multiple nested paths for a command, and then try to execute a shared partial path of it, you get an error message where the first path is displayed multiple times.
const { Builtins, Command, runExit } = require('clipanion'); runExit( { binaryName: 'test' }, [ Builtins.HelpCommand, class extends Command { static paths = [['foo', 'bar'], ['foo', 'baz']]; async execute() { console.log('hi'); } } ], ['foo'] );
Unknown Syntax Error: Command not found; did you mean: $ test foo bar While running foo
or
Unknown Syntax Error: Command not found; did you mean one of: 0. test foo bar 1. test foo baz While running foo
It's really up to you (or a config option?) whether to include multiple paths for one command in the help text.
Unknown Syntax Error: Command not found; did you mean one of: 0. test foo bar 1. test foo bar While running foo
As you can see, while baz isn't shown at all (which, arguably, might be fine), bar is shown twice.
baz
bar
Description
If you define multiple nested paths for a command, and then try to execute a shared partial path of it, you get an error message where the first path is displayed multiple times.
Source
Expected result
or
It's really up to you (or a config option?) whether to include multiple paths for one command in the help text.
Actual result
As you can see, while
baz
isn't shown at all (which, arguably, might be fine),bar
is shown twice.