Add :history command.

This commit is contained in:
Imran Sobir 2017-02-10 17:47:20 +05:00
parent 46752a2c24
commit 37c3b79b9b
2 changed files with 31 additions and 0 deletions

View File

@ -1396,6 +1396,19 @@ class CommandDispatcher:
tab.dump_async(callback, plain=plain)
@cmdutils.register(instance='command-dispatcher', name='history',
scope='window')
def show_history(self, tab=True, bg=False, window=False):
r"""Show browsing history
Args:
tab: Open in a new tab.
bg: Open in a background tab.
window: Open in a new window.
"""
url = QUrl('qute://history/')
self._open(url, tab, bg, window)
@cmdutils.register(instance='command-dispatcher', name='help',
scope='window')
@cmdutils.argument('topic', completion=usertypes.Completion.helptopic)

View File

@ -290,6 +290,24 @@ Feature: Various utility commands.
- about:blank
- qute://help/index.html (active)
# :history
Scenario: :history without arguments
When I run :tab-only
And I run :history
And I wait until qute://history/ is loaded
Then the following tabs should be open:
- qute://history/ (active)
Scenario: :history with -t
When I open about:blank
And I run :tab-only
And I run :history -t
And I wait until qute://history/ is loaded
Then the following tabs should be open:
- about:blank
- qute://history/ (active)
# :home
Scenario: :home with single page