fish_config: filter out uninteresting bindings

currently: self-insert and 'begin;end'
This commit is contained in:
Jin Liu 2016-08-23 17:34:06 +08:00
parent bfee664af3
commit f76e620be8

View file

@ -84,6 +84,8 @@ named_colors = {
'white' : 'FFFFFF'
}
bindings_blacklist = set(["self-insert", "'begin;end'"])
def parse_one_color(comp):
""" A basic function to parse a single color value like 'FFA000' """
if comp in named_colors:
@ -587,6 +589,9 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
command = comps[2]
binding_parser.set_buffer(comps[1])
if command in bindings_blacklist:
continue
readable_binding = binding_parser.get_readable_binding()
if command in command_to_binding:
fish_binding = command_to_binding[command]