Add command to generate shell completion (#1052)

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
Co-authored-by: Islon Scherer <islonscherer@gmail.com>
This commit is contained in:
Artem Yarmoliuk
2025-05-01 16:39:30 +01:00
committed by GitHub
parent 49a593f5c9
commit e4716c9e45
3 changed files with 57 additions and 1 deletions

View File

@@ -381,7 +381,7 @@ pkl eval -m . myFiles.pkl
pkl eval -m "%{moduleName}" foo.pkl bar.pkl
----
For additional details, see xref:language-reference:index.adoc#multiple-file-output[Multiple File Output]
For additional details, see xref:language-reference:index.adoc#multiple-file-output[Multiple File Output]
in the language reference.
====
@@ -651,6 +651,22 @@ Same meaning as <<output-path>> in <<command-eval>>.
This command also takes <<common-options,common options>>.
[[command-shell-completion]]
=== `pkl shell-completion`
*Synopsis*: `pkl shell-completion <shell>`
Generate shell completion script. Supported shells are: `bash`, `zsh`, `fish`.
[source,shell]
----
# Generate shell completion script for bash
pkl shell-completion bash
# Generate shell completion script for zsh
pkl shell-completion zsh
----
[[common-options]]
=== Common options