diff --git a/kitty/cli.py b/kitty/cli.py index fcd6a8976..be3801a4c 100644 --- a/kitty/cli.py +++ b/kitty/cli.py @@ -612,7 +612,7 @@ are running a program that does not set titles. --config -c type=list -completion=type:file ext:conf group:"Config files" +completion=type:file ext:conf group:"Config files" kwds:none,NONE {config_help} diff --git a/kitty/complete.py b/kitty/complete.py index 68163d339..14587be19 100644 --- a/kitty/complete.py +++ b/kitty/complete.py @@ -637,6 +637,10 @@ def complete_file_path(ans: Completions, spec: Dict[str, str], prefix: str, only def complete_path(ans: Completions, opt: OptionDict, prefix: str) -> None: spec = opt['completion'] t = spec['type'] + if 'kwds' in spec: + kwds = [x for x in spec['kwds'].split(',') if x.startswith(prefix)] + if kwds: + ans.add_match_group('Keywords', kwds) if t == 'file': complete_file_path(ans, spec, prefix) elif t == 'directory': diff --git a/kitty/launch.py b/kitty/launch.py index 13fa3f4c8..f91794f35 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -73,6 +73,7 @@ opened window. --cwd +completion=type:directory kwds:current,oldest,last_reported The working directory for the newly launched child. Use the special value :code:`current` to use the working directory of the currently active window. The special value :code:`last_reported` uses the last working directory reported