From af14a8894b1ad8ba6841de38f2145ee88f3faafa Mon Sep 17 00:00:00 2001 From: knrt10 Date: Fri, 28 Aug 2020 17:41:31 +0530 Subject: [PATCH] Add docs for autocompletion Signed-off-by: knrt10 --- docs/cli/lokoctl.md | 1 + docs/cli/lokoctl_completion.md | 33 +++++++++++++++++++++++ docs/cli/lokoctl_completion_bash.md | 41 +++++++++++++++++++++++++++++ docs/cli/lokoctl_completion_zsh.md | 40 ++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 docs/cli/lokoctl_completion.md create mode 100644 docs/cli/lokoctl_completion_bash.md create mode 100644 docs/cli/lokoctl_completion_zsh.md diff --git a/docs/cli/lokoctl.md b/docs/cli/lokoctl.md index 0c9af9377..2475428c3 100644 --- a/docs/cli/lokoctl.md +++ b/docs/cli/lokoctl.md @@ -21,6 +21,7 @@ Manage Lokomotive clusters ### SEE ALSO * [lokoctl cluster](lokoctl_cluster.md) - Manage a cluster +* [lokoctl completion](lokoctl_completion.md) - Generate autocompletion script for the specified shell * [lokoctl component](lokoctl_component.md) - Manage components * [lokoctl health](lokoctl_health.md) - Get the health of a cluster * [lokoctl version](lokoctl_version.md) - Print version information diff --git a/docs/cli/lokoctl_completion.md b/docs/cli/lokoctl_completion.md new file mode 100644 index 000000000..1392aca62 --- /dev/null +++ b/docs/cli/lokoctl_completion.md @@ -0,0 +1,33 @@ +## lokoctl completion + +Generate autocompletion script for the specified shell + +### Synopsis + + +Generate autocompletion script for lokoctl for the specified shell (bash or zsh). + + +### Options + +``` + -h, --help help for completion +``` + +### Options inherited from parent commands + +``` + --kubeconfig-file string Path to a kubeconfig file. If empty, the following precedence order is used: + 1. Cluster asset dir when a lokocfg file is present in the current directory. + 2. KUBECONFIG environment variable. + 3. ~/.kube/config file. + --lokocfg string Path to lokocfg directory or file (default "./") + --lokocfg-vars string Path to lokocfg.vars file (default "./lokocfg.vars") +``` + +### SEE ALSO + +* [lokoctl](lokoctl.md) - Manage Lokomotive clusters +* [lokoctl completion bash](lokoctl_completion_bash.md) - Generate autocompletion script for bash +* [lokoctl completion zsh](lokoctl_completion_zsh.md) - Generate autocompletion script for zsh + diff --git a/docs/cli/lokoctl_completion_bash.md b/docs/cli/lokoctl_completion_bash.md new file mode 100644 index 000000000..e4c5f6439 --- /dev/null +++ b/docs/cli/lokoctl_completion_bash.md @@ -0,0 +1,41 @@ +## lokoctl completion bash + +Generate autocompletion script for bash + +### Synopsis + + +Generate the autocompletion script for lokoctl for the bash shell. + +To load completions in your current shell session: +`$ source <(lokoctl completion bash)` + +To load completions for every new session, execute once: +Linux: `$ lokoctl completion bash > /etc/bash_completion.d/lokoctl && exec $SHELL` +MacOS: `$ lokoctl completion bash > /usr/local/etc/bash_completion.d/lokoctl && exec $SHELL` + +``` +lokoctl completion bash +``` + +### Options + +``` + -h, --help help for bash +``` + +### Options inherited from parent commands + +``` + --kubeconfig-file string Path to a kubeconfig file. If empty, the following precedence order is used: + 1. Cluster asset dir when a lokocfg file is present in the current directory. + 2. KUBECONFIG environment variable. + 3. ~/.kube/config file. + --lokocfg string Path to lokocfg directory or file (default "./") + --lokocfg-vars string Path to lokocfg.vars file (default "./lokocfg.vars") +``` + +### SEE ALSO + +* [lokoctl completion](lokoctl_completion.md) - Generate autocompletion script for the specified shell + diff --git a/docs/cli/lokoctl_completion_zsh.md b/docs/cli/lokoctl_completion_zsh.md new file mode 100644 index 000000000..50fadbc01 --- /dev/null +++ b/docs/cli/lokoctl_completion_zsh.md @@ -0,0 +1,40 @@ +## lokoctl completion zsh + +Generate autocompletion script for zsh + +### Synopsis + + +Generate the autocompletion script for lokoctl for the zsh shell. + +To load completions in your current shell session: +`$ source <(lokoctl completion zsh)` + +To load completions for every new session, execute once: +`$ lokoctl completion zsh > "${fpath[1]}/_lokoctl" && exec $SHELL` + +``` +lokoctl completion zsh +``` + +### Options + +``` + -h, --help help for zsh +``` + +### Options inherited from parent commands + +``` + --kubeconfig-file string Path to a kubeconfig file. If empty, the following precedence order is used: + 1. Cluster asset dir when a lokocfg file is present in the current directory. + 2. KUBECONFIG environment variable. + 3. ~/.kube/config file. + --lokocfg string Path to lokocfg directory or file (default "./") + --lokocfg-vars string Path to lokocfg.vars file (default "./lokocfg.vars") +``` + +### SEE ALSO + +* [lokoctl completion](lokoctl_completion.md) - Generate autocompletion script for the specified shell +