diff options
Diffstat (limited to 'ranger/api/keys.py')
-rw-r--r-- | ranger/api/keys.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/ranger/api/keys.py b/ranger/api/keys.py index 4ac2e18e..87186378 100644 --- a/ranger/api/keys.py +++ b/ranger/api/keys.py @@ -22,34 +22,6 @@ from ranger import RANGERDIR from ranger.gui.widgets import console_mode as cmode from ranger.container.bookmarks import ALLOWED_KEYS as ALLOWED_BOOKMARK_KEYS -def make_abbreviations(command_list): - def bind(*args, **keywords): - if keywords: - command_list.show(*args, **keywords) - else: - lastarg = args[-1] - if hasattr(lastarg, '__call__'): - # do the binding - command_list.bind(lastarg, *args[:-1]) - else: - # act as a decorator. eg: - # @bind('a') - # def do_stuff(arg): - # arg.fm.ui.do_stuff() - # - # is equivalent to: - # bind('a', lambda arg: arg.fm.ui.do_stuff()) - return lambda fnc: command_list.bind(fnc, *args) - - def show(*args, **keywords): - command_list.show(*args, **keywords) - - def alias(*args): - command_list.alias(*args) - - return bind, alias - - class Wrapper(object): def __init__(self, firstattr): self.__firstattr__ = firstattr |