Merge pull request #276 from mcarton/tmux

Add a tmux rule
This commit is contained in:
Vladimir Iakovlev
2015-07-07 16:29:15 +03:00
3 changed files with 35 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import re
def match(command, settings):
return ('tmux' in command.script
and 'ambiguous command:' in command.stderr
and 'could be:' in command.stderr)
def get_new_command(command, settings):
cmd = re.match(r"ambiguous command: (.*), could be: ([^, \n]*)",
command.stderr)
return command.script.replace(cmd.group(1), cmd.group(2))