doit/cmd_completion.py
def _bash_cmd_args(cls, cmd):
        """return case item for completion of specific sub-command"""
        comp = []
        if 'TASK' in cmd.doc_usage:
            comp.append('${tasks}')
        if 'COMMAND' in cmd.doc_usage:
            comp.append('${sub_cmds}')
        if comp:
            completion = '-W "{0}"'.format(' '.join(comp))
        else:
            completion = '-f' # complete file
        return bash_subcmd_arg.format(cmd_name=cmd.name, completion=completion)
return case item for completion of specific sub-command
return case item for completion of specific sub-command
return case item for completion of specific sub - command
def _bash_cmd_args(cls, cmd):
        comp = []
        if 'TASK' in cmd.doc_usage:
            comp.append('${tasks}')
        if 'COMMAND' in cmd.doc_usage:
            comp.append('${sub_cmds}')
        if comp:
            completion = '-W "{0}"'.format(' '.join(comp))
        else:
            completion = '-f' 
        return bash_subcmd_arg.format(cmd_name=cmd.name, completion=completion)
def _bash_cmd_args ( cls , cmd ) : comp = [ ] if 'TASK' in cmd . doc_usage : comp . append ( '${tasks}' ) if 'COMMAND' in cmd . doc_usage : comp . append ( '${sub_cmds}' ) if comp : completion = '-W "{0}"' . format ( ' ' . join ( comp ) ) else : completion = '-f' return bash_subcmd_arg . format ( cmd_name = cmd . name , completion = completion )
return case item for completion of specific sub-command
return case item for completion of specific sub - command
"""return case item for completion of specific sub-command""" # complete file
cls
cmd