this is all the history:
helios: Add the possibility to hide an option
add the hidden flag to option as well, to prevent display of this option when thor help task is called
eventualbuddha: Thanks for the patch! I'm not entirely sure why you'd want to do this. If the option isn't safe or you don't want the end user to be able to configure it, why expose it as an option at all? If you really want it to be externally configurable why not use an environment variable?
helios: Hi, I'm writing a dynamic wrapper and this wrapper can create thor tasks as well, a generic example of a regular wrapping is https://github.com/helios/bioruby-ngs/blob/master/lib/tasks/rna.thor#L10
The problem is , my wrapper has a program associated with it and options and arguments.
Some binary has a particular syntax like the one below (merge). Having an hidden option I can configure my wrapper setting an option which will be available as thor's option but not configurable by the end user.
but it works like regular unix binaries program_name options arguments
But other software has a syntax like this:
where samtools is the main program then
merge select a funcitionality and then
options and arguments
Usage: samtools merge [-nr] [-h inh.sam] [...]
Options: -n sort by read names
-r attach RG tag (inferred from file names)
-u uncompressed BAM output
-f overwrite the output BAM if exist
-1 compress level 1
-R STR merge file in the specified region STR [all]
-h FILE copy the header in FILE to [in1.bam]
that was my solution to the problem but If you have any idea please share it with me.
And thanks for your quick reply.
wycats: We also had this case in Bundler for deprecated options.
@helios Can you rebase this patch?
@eventualbuddha does the use-case above plus the deprecation case satisfy you that this is a valid feature?
eventualbuddha:Deprecated options seems like a good enough reason to have something like this.
add the hidded flag to option as well, to prevent display of this opt…
…ion when thor help task is called.
Looks good to me. We could use this in bundler.