mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
Merge branch 'master' of github.com:fish-shell/fish-shell
This commit is contained in:
commit
f6a89d13c2
1 changed files with 10 additions and 4 deletions
|
@ -563,11 +563,17 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||||
bind_args_list = comps[1].split(' ', 6)
|
bind_args_list = comps[1].split(' ', 6)
|
||||||
(options, args) = parser.parse_args(bind_args_list)
|
(options, args) = parser.parse_args(bind_args_list)
|
||||||
|
|
||||||
|
if options.k:
|
||||||
key_name= options.k
|
key_name= options.k
|
||||||
command = args[0]
|
command = ' '.join(args)
|
||||||
|
|
||||||
binding_parser.set_buffer(key_name)
|
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)
|
bindings.append(fish_binding)
|
||||||
|
|
||||||
return [ binding.get_json_obj() for binding in bindings ]
|
return [ binding.get_json_obj() for binding in bindings ]
|
||||||
|
|
Loading…
Reference in a new issue