Delegate based completion for @launch args
This commit is contained in:
parent
dc403156a9
commit
fd631bf402
@ -72,7 +72,8 @@ type=bool-set
|
|||||||
If specified the tab containing the window this command is run in is used
|
If specified the tab containing the window this command is run in is used
|
||||||
instead of the active tab
|
instead of the active tab
|
||||||
''' + '\n\n' + launch_options_spec().replace(':option:`launch', ':option:`kitty @ launch')
|
''' + '\n\n' + launch_options_spec().replace(':option:`launch', ':option:`kitty @ launch')
|
||||||
args = RemoteCommand.Args(spec='[CMD ...]', json_field='args')
|
args = RemoteCommand.Args(spec='[CMD ...]', json_field='args', completion=RemoteCommand.CompletionSpec.from_string(
|
||||||
|
'type:special group:complete_kitty'))
|
||||||
|
|
||||||
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
|
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
|
||||||
ans = {'args': args or []}
|
ans = {'args': args or []}
|
||||||
|
|||||||
@ -164,6 +164,8 @@ def completion(self: TestCompletion, tdir: str):
|
|||||||
add('kitty bash ', is_delegate(1, 'bash'))
|
add('kitty bash ', is_delegate(1, 'bash'))
|
||||||
add('kitty -1 bash ', is_delegate(2, 'bash'))
|
add('kitty -1 bash ', is_delegate(2, 'bash'))
|
||||||
add('kitty -1 bash --n', is_delegate(2, 'bash'))
|
add('kitty -1 bash --n', is_delegate(2, 'bash'))
|
||||||
|
add('kitty @launch --type tab bash --n', is_delegate(4, 'bash'))
|
||||||
|
add('kitty @launch e', all_words('exe1'))
|
||||||
|
|
||||||
for cmd, tests, result in zip(all_cmds, all_tests, run_tool()):
|
for cmd, tests, result in zip(all_cmds, all_tests, run_tool()):
|
||||||
self.current_cmd = cmd
|
self.current_cmd = cmd
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user