It would be useful to have visibility into the command line being completed in Command.args().
For instance, if you wanted to do bash-style path completion, you could simply:
from ishell.console import Console
from ishell.command import Command
import glob
class ExampleCommand(Command):
def args(self, line):
line_without_command_name = ''.join(line.split()[1:])
return glob.glob(line_without_command_name + '*')
def run(self, line):
print "This is an example command."
example = ExampleCommand('example', dynamic_args=True)
console = Console()
console.addChild(example)
It would be useful to have visibility into the command line being completed in Command.args().
For instance, if you wanted to do bash-style path completion, you could simply: