Add a tmux rule

This commit is contained in:
mcarton
2015-07-04 14:17:33 +02:00
parent cb33c912e5
commit 3822f62d90
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))