mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
More work on merging completions with parse tree
This commit is contained in:
@@ -203,7 +203,7 @@ class ArgsHandling:
|
||||
if c is not None:
|
||||
yield f'{go_name}.StopCompletingAtArg = {c}'
|
||||
if self.completion:
|
||||
yield from self.completion.as_go_code(go_name)
|
||||
yield from self.completion.as_go_code(go_name + '.ArgCompleter', ' = ')
|
||||
|
||||
def as_go_code(self, cmd_name: str, field_types: Dict[str, str], handled_fields: Set[str]) -> Iterator[str]:
|
||||
c = self.args_count
|
||||
|
||||
@@ -73,7 +73,7 @@ If specified the tab containing the window this command is run in is used
|
||||
instead of the active tab
|
||||
''' + '\n\n' + launch_options_spec().replace(':option:`launch', ':option:`kitty @ launch')
|
||||
args = RemoteCommand.Args(spec='[CMD ...]', json_field='args', completion=RemoteCommand.CompletionSpec.from_string(
|
||||
'type:special group:complete_kitty'))
|
||||
'type:special group:cli.CompleteExecutableFirstArg'))
|
||||
|
||||
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
|
||||
ans = {'args': args or []}
|
||||
|
||||
Reference in New Issue
Block a user