summaryrefslogtreecommitdiff
path: root/alot/command.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-08-04 18:56:45 +0100
committerpazz <patricktotzke@gmail.com>2011-08-04 18:56:45 +0100
commit0b6a640eabf107777c68a5689af44b744b387335 (patch)
treecdb44d55baa9e23b14403e5948ec1714acf22ac6 /alot/command.py
parent58ff02c6424607312ee83464f2247adf70e58cbd (diff)
aliases from config. issue #59
Diffstat (limited to 'alot/command.py')
-rw-r--r--alot/command.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/alot/command.py b/alot/command.py
index aa9d3797..804604b4 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -724,14 +724,6 @@ class TaglistSelectCommand(Command):
ui.apply_command(cmd)
-aliases = {'clo': 'close',
- 'bn': 'bnext',
- 'bp': 'bprevious',
- 'bcf': 'buffer close focussed',
- 'ls': 'bufferlist',
- 'quit': 'exit',
-}
-
COMMANDS = {
'search': {
'refine': (RefineCommand, {}),
@@ -814,8 +806,8 @@ def interpret_commandline(cmdline, mode):
params = ''
# unfold aliases
- if cmd in aliases:
- cmd = aliases[cmd]
+ if settings.config.has_option('command-aliases', cmd):
+ cmd = settings.config.get('command-aliases', cmd)
# allow to shellescape without a space after '!'
if cmd.startswith('!'):