Tuesday 15 March 2011

scala - Running a scopt option with no values -


I am writing a CLI in Scala using Scop.

I would like to add to the ability to do call with or without command.

For example:

  Claustibility -O & lt; Value & gt; & Lt; Price & gt; & Lt; Price & gt;  

Send a value of values ​​to [string].

I also want to be able to run -

  Clevelity -O  

to send me an empty sq [string] Want to, but how can I see it?

Thank you.

to:

  arg [file] ("& lt; File & gt;.). Infinite () Optional () Action {(x, c) = & gt;  

The following uses produce text:

  & lt; File & gt; ... Optional unrelated arguments are related to  

and files: Config file within Secure Case [File] . Note the countless and alternate researchers do this, by which you can produce as much as you want, and this is not necessary. As you can see in the case code of the example, the default value of files is an empty signal, as you want.

Last But at the least, let me tell you that to be a flag -o , like using the Gitub example - Verbose is.


No comments:

Post a Comment