Open axiomcura opened 1 year ago
Since cytosnake is a CLI tool that will house a multitude of workflows, it would be ideal to implement auto-tab completion for workflow names.
cytosnake
This will make it easier for user to find which workflow they would like to use instead of spelling the whole workflow name out.
There is a nice package called argcomplete that works really well with python's argparser module.
argparser
Here is an example:
import argparse import argcomplete parser = argparse.ArgumentParser(description='My program') # Add your arguments as usual parser.add_argument('--foo', help='foo help') parser.add_argument('--bar', help='bar help') # Call argcomplete.autocomplete() with your argparse object argcomplete.autocomplete(parser) # Parse the arguments args = parser.parse_args()
argcomplete only requires the parser object in order to conduct its auto completion, therefore it is really easy to implement!
argcomplete
Since
cytosnake
is a CLI tool that will house a multitude of workflows, it would be ideal to implement auto-tab completion for workflow names.This will make it easier for user to find which workflow they would like to use instead of spelling the whole workflow name out.
There is a nice package called argcomplete that works really well with python's
argparser
module.Here is an example:
argcomplete
only requires the parser object in order to conduct its auto completion, therefore it is really easy to implement!