Пример #1
0
 def execute(self, name):
     tags = TagStorage()
     if name not in tags['tags']:
         qq.output('Tag not found: ' + name)
         return False
     path = tags['tags'][name]
     qq.shell_execute('cd "{}"'.format(path))
     qq.output('Changing to tagged folder "{}" ({})'.format(name, path))
     return True
Пример #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