Beispiel #1
0
 def execute(self, command_name):
     try:
         inst = qq.instantiate_command(command_name)
     except Exception as e:
         qq.output('Failed to instantiate command: ' + command_name)
         qq.output(e)
     qq.output(inst.help())
     return True
Beispiel #2
0
 def execute(self, command_name):
     try:
         inst = qq.instantiate_command(command_name)
     except Exception as e:
         qq.output('Failed to instantiate command: ' + command_name)
         qq.output(e)
         return False
     if inst is None:
         qq.output('Command not found: ' + command_name)
         return False
     editor = os.environ.get('EDITOR', None)
     if editor is None:
         qq.output('The EDITOR environment variable is not set.')
         return False
     qq.shell_execute('"{}" "{}"'.format(editor, inst.fullpath))
     return True