command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Usage showing wrong filename if .exe not used when calling program

Open jeremyhallden opened this issue 2 years ago • 1 comments

Hi,

Let's say I've got a program called Foo.Bar.CLI.exe which uses System.CommandLine. If I run "Foo.Bar.CLI.exe -h" the printed usage is correct, i.e. "Foo.Bar.CLI [command] [options]". If I skip the .exe and run "Foo.Bar.CLI -h" the printed usage is i.e. "Foo.Bar [command] [options]". The last part of the program's filename, .CLI, has been erroneously cropped this time and the proposed command does not work.

Am I missing anything?

Thanks for a great library otherwise :)

jeremyhallden avatar Jul 20 '23 21:07 jeremyhallden

Hi, I have the same issue with a command named com.mycompany.mycommand.exe for windows, and com.mycompany.mycommand for Linux.

Is there any way to override/provide a command name ourself ?

Kind Regards

fmaeseele avatar Oct 24 '23 10:10 fmaeseele