parent
00673ef7da
commit
245212efa1
@ -25,7 +25,7 @@ import itertools
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal, QObject
|
||||
|
||||
from qutebrowser.config import configdata, textwrapper
|
||||
from qutebrowser.config import configdata, textwrapper, config
|
||||
from qutebrowser.commands import cmdutils, cmdexc
|
||||
from qutebrowser.utils import log, utils, qtutils, message, usertypes
|
||||
|
||||
@ -352,7 +352,8 @@ class KeyConfigParser(QObject):
|
||||
line))
|
||||
commands = [c.split(maxsplit=1)[0].strip() for c in commands]
|
||||
for cmd in commands:
|
||||
if cmd not in cmdutils.cmd_dict:
|
||||
aliases = config.section('aliases')
|
||||
if cmd not in cmdutils.cmd_dict and cmd not in aliases:
|
||||
raise KeyConfigError("Invalid command '{}'!".format(cmd))
|
||||
|
||||
def _read_command(self, line):
|
||||
|
@ -61,6 +61,18 @@ Feature: Keyboard input
|
||||
And I run :bind <ctrl-test23>
|
||||
Then the message "<ctrl-test23> is bound to 'message-info bar' in normal mode" should be shown
|
||||
|
||||
Scenario: Binding to an alias
|
||||
When I run :set aliases 'mib' 'message-info baz'
|
||||
And I run :bind test25 mib
|
||||
And I press the keys "test25"
|
||||
Then the message "baz" should be shown
|
||||
|
||||
Scenario: Printing a bound alias
|
||||
When I run :set aliases 'mib' 'message-info baz'
|
||||
And I run :bind <test26> mib
|
||||
And I run :bind <test26>
|
||||
Then the message "<test26> is bound to 'mib' in normal mode" should be shown
|
||||
|
||||
# :unbind
|
||||
|
||||
Scenario: Binding and unbinding a keychain
|
||||
|
Loading…
Reference in New Issue
Block a user