Add the possibility to hide an option #197

merged 1 commit into from Nov 22, 2011


None yet

2 participants


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

I want to add an option but I don't want the user know about it because it could not be save or because I want to use the option as a default parameter but not configurable from the end user.

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

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.

Erikhuda member

Looks good to me. We could use this in bundler.

@wycats wycats merged commit 02fd1dc into erikhuda:master Nov 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment