Skip to content

Commit

Permalink
update docs (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny0826 authored Nov 15, 2021
1 parent fbd4e76 commit 9706952
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 39 deletions.
2 changes: 0 additions & 2 deletions docs/en-us/cli/kubecm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ Find more information at: https://github.com/sunny0826/kubecm
* [kubecm rename](kubecm_rename.md) - Rename the contexts of kubeconfig
* [kubecm switch](kubecm_switch.md) - Switch Kube Context interactively
* [kubecm version](kubecm_version.md) - Print version info

###### Auto generated by spf13/cobra on 18-Nov-2020
59 changes: 41 additions & 18 deletions docs/en-us/cli/kubecm_completion.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
## kubecm completion

Generates bash/zsh completion scripts
Generate completion script

### Synopsis

Output shell completion code for the specified shell (bash or zsh).
To load completions:

```
kubecm completion [flags]
```
Bash:

### Examples
$ source <(kubecm completion bash)

```
# To load completions for each session, execute once:
# Linux:
$ kubecm completion bash > /etc/bash_completion.d/kubecm
# macOS:
$ kubecm completion bash > /usr/local/etc/bash_completion.d/kubecm

Zsh:

# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:

$ echo "autoload -U compinit; compinit" >> ~/.zshrc

# To load completions for each session, execute once:
$ kubecm completion zsh > "${fpath[1]}/_kubecm"

# You will need to start a new shell for this setup to take effect.

# bash
kubecm completion bash > ~/.kube/kubecm.bash.inc
printf "
# kubecm shell completion
source '$HOME/.kube/kubecm.bash.inc'
" >> $HOME/.bash_profile
source $HOME/.bash_profile
fish:

# add to $HOME/.zshrc
source <(kubecm completion zsh)
# or
kubecm completion zsh > "${fpath[1]}/_kubecm"
$ kubecm completion fish | source

# To load completions for each session, execute once:
$ kubecm completion fish > ~/.config/fish/completions/kubecm.fish

PowerShell:

PS> kubecm completion powershell | Out-String | Invoke-Expression

# To load completions for every new session, run:
PS> kubecm completion powershell > kubecm.ps1
# and source this file from your PowerShell profile.


```
kubecm completion [bash|zsh|fish|powershell] [flags]
```

### Options
Expand All @@ -40,3 +59,7 @@ kubecm completion zsh > "${fpath[1]}/_kubecm"
```
--config string path of kubeconfig (default "/Users/guoxudong/.kube/config")
```

### SEE ALSO

* [kubecm](kubecm.md) - KubeConfig Manager.
2 changes: 0 additions & 2 deletions docs/zh-cn/cli/kubecm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ Find more information at: https://github.com/sunny0826/kubecm
* [kubecm rename](kubecm_rename.md) - Rename the contexts of kubeconfig
* [kubecm switch](kubecm_switch.md) - Switch Kube Context interactively
* [kubecm version](kubecm_version.md) - Print version info

###### Auto generated by spf13/cobra on 18-Nov-2020
53 changes: 36 additions & 17 deletions docs/zh-cn/cli/kubecm_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,48 @@

### 简介

输出自动补全脚本(bash 或 zsh)
To load completions:

```
kubecm completion [flags]
```
Bash:

### 示例
$ source <(kubecm completion bash)

```
# To load completions for each session, execute once:
# Linux:
$ kubecm completion bash > /etc/bash_completion.d/kubecm
# macOS:
$ kubecm completion bash > /usr/local/etc/bash_completion.d/kubecm

Zsh:

# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:

$ echo "autoload -U compinit; compinit" >> ~/.zshrc

# To load completions for each session, execute once:
$ kubecm completion zsh > "${fpath[1]}/_kubecm"

# bash
kubecm completion bash > ~/.kube/kubecm.bash.inc
printf "
# kubecm shell completion
source '$HOME/.kube/kubecm.bash.inc'
" >> $HOME/.bash_profile
source $HOME/.bash_profile
# You will need to start a new shell for this setup to take effect.

# add to $HOME/.zshrc
source <(kubecm completion zsh)
# or
kubecm completion zsh > "${fpath[1]}/_kubecm"
fish:

$ kubecm completion fish | source

# To load completions for each session, execute once:
$ kubecm completion fish > ~/.config/fish/completions/kubecm.fish

PowerShell:

PS> kubecm completion powershell | Out-String | Invoke-Expression

# To load completions for every new session, run:
PS> kubecm completion powershell > kubecm.ps1
# and source this file from your PowerShell profile.


```
kubecm completion [bash|zsh|fish|powershell] [flags]
```

### 选项
Expand Down

0 comments on commit 9706952

Please sign in to comment.