mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Updated code to parse bindings in webconfig.py
This commit is contained in:
parent
2de914d8c3
commit
3e01dd955f
1 changed files with 10 additions and 4 deletions
|
@ -563,11 +563,17 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
bind_args_list = comps[1].split(' ', 6)
|
||||
(options, args) = parser.parse_args(bind_args_list)
|
||||
|
||||
if options.k:
|
||||
key_name= options.k
|
||||
command = args[0]
|
||||
|
||||
command = ' '.join(args)
|
||||
binding_parser.set_buffer(key_name)
|
||||
fish_binding = FishBinding(command=command, binding=key_name, readable_binding=binding_parser.get_readable_binding())
|
||||
else:
|
||||
key_name = None
|
||||
command = ' '.join(args[1:])
|
||||
binding_parser.set_buffer(args[0])
|
||||
|
||||
readable_binding = binding_parser.get_readable_binding()
|
||||
fish_binding = FishBinding(command, key_name, readable_binding)
|
||||
bindings.append(fish_binding)
|
||||
|
||||
return [ binding.get_json_obj() for binding in bindings ]
|
||||
|
|
Loading…
Reference in a new issue