fclp / fluent-command-line-parser

A simple, strongly typed .NET C# command line parser library using a fluent easy to use interface
Other
530 stars 85 forks source link

Question: Use a string from another source to populate arguments? #107

Closed EricZimmerman closed 5 years ago

EricZimmerman commented 5 years ago

is it possible to start with a string of command line args, say, in a separate file, and, if that file exists, read it, and update args with said commandline?

In other words, id like to provide a way for fluent to read a command line and parse it into the argument object i have.

if its not possible for this project to take a string and cut it up, is there a method any knows of that allows me to essentially pass in such a string and end up with a string array, just like args ends up looking like when a program starts?

thanks!

siywilliams commented 5 years ago

There is no current overload for just a string so you'll have to provide your own extension to convert a string into string[].

I don't have a good implementation to share sadly, and after a quick google it appears no one else has a particulary great method of doing so either unfortunately.

If there is a solution that I could integrate into the library that would be super for a lot of people.

EricZimmerman commented 5 years ago

thanks! ill see what i can do