This commit is contained in:
Florian Bruhin 2014-09-05 06:57:02 +02:00
parent 0a094c6e58
commit 05f3809d01
2 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,12 @@ class ArgumentParserExit(Exception):
class HelpAction(argparse.Action):
"""Argparse action to open the help page in the browser.
This is horrible encapsulation, but I can't think of a good way to do this
better...
"""
def __call__(self, parser, _namespace, _values, _option_string=None):
QCoreApplication.instance().mainwindow.tabs.tabopen(
QUrl('qute:help/commands.html#{}'.format(parser.name)))

View File

@ -23,7 +23,7 @@ import re
import sys
import functools
from PyQt5.QtCore import QEvent, QCoreApplication
from PyQt5.QtCore import QEvent
from qutebrowser.utils import log, utils