commandline icon indicating copy to clipboard operation
commandline copied to clipboard

Fixes issue #752

Open vigneashs opened this issue 3 years ago • 1 comments

Current OptionAttribute have a limitation of shortName being able to be set to just one character. This creates a limitation in the functionality of giving more readable or rememberable short names. For example, -FileSystem can be made to -FS.

This PR tends to address this limitation.

PS: this my first PR with this repository, let me know if more test cases have to be added.

Issue #752

vigneashs avatar Jun 02 '22 03:06 vigneashs

Thank you for submitting.

the design goal of shortname originates from the original getopt parser... you cant have a -FS if you have -F and a -S because how does the parser distinguish?

if you want a short version of --FileSystem then create --FS option.

IMO I dont feel like this is a good move.

It could be argued to try to match Longest shortName first. but then there needs to be conflict reporting if a user creates

[Option("FS", "FileSystem")]
public string FileSystem { get; set; }
//and
[Option("S", "FS")]
public string FileStatus { get; set; }

This adds a whole bunch of need for testing/conflict resolution and reporting logic to be added.

ericnewton76 avatar Sep 10 '22 17:09 ericnewton76