Skip to content

Commit

Permalink
Rename ls (#40)
Browse files Browse the repository at this point in the history
* fix

* rename ls

* fix
  • Loading branch information
sunny0826 committed Feb 4, 2021
1 parent 30aeb06 commit 72eceb0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Available Commands:
create Create new KubeConfig(experiment)
delete Delete the specified context from the kubeconfig
help Help about any command
ls List kubeconfig
list List kubeconfig
merge Merge the kubeconfig files in the specified directory
namespace Switch or change namespace interactively
rename Rename the contexts of kubeconfig
Expand Down
7 changes: 4 additions & 3 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ type ListCommand struct {
// Init ListCommand
func (lc *ListCommand) Init() {
lc.command = &cobra.Command{
Use: "ls",
Use: "list",
Short: "List KubeConfig",
Long: "List KubeConfig",
Aliases: []string{"l"},
Aliases: []string{"ls", "l"},
RunE: func(cmd *cobra.Command, args []string) error {
return lc.runList(cmd, args)
},
Expand Down Expand Up @@ -79,8 +79,9 @@ func filterArgs(args []string, config *clientcmdapi.Config) (*clientcmdapi.Confi
func listExample() string {
return `
# List all the contexts in your KubeConfig file
kubecm ls
kubecm list
# Aliases
kubecm ls
kubecm l
# Filter out keywords(Multi-keyword support)
kubecm ls kind k3s
Expand Down
2 changes: 1 addition & 1 deletion docs/en-us/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* [alias](/en-us/cli/kubecm_alias.md)
* [completion](/en-us/cli/kubecm_completion.md)
* [delete](/en-us/cli/kubecm_delete.md)
* [ls](/en-us/cli/kubecm_ls.md)
* [list](/en-us/cli/kubecm_list.md)
* [merge](/en-us/cli/kubecm_merge.md)
* [namespace](/en-us/cli/kubecm_namespace.md)
* [rename](/en-us/cli/kubecm_rename.md)
Expand Down
7 changes: 4 additions & 3 deletions docs/en-us/cli/kubecm_ls.md → docs/en-us/cli/kubecm_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ List KubeConfig
List KubeConfig

```
kubecm ls
kubecm list
```

### Examples

```
# List all the contexts in your kubeconfig file
kubecm ls
# List all the contexts in your KubeConfig file
kubecm list
# Aliases
kubecm ls
kubecm l
# Filter out keywords(Multi-keyword support)
kubecm ls kind k3s
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* [alias](/zh-cn/cli/kubecm_alias.md)
* [completion](/zh-cn/cli/kubecm_completion.md)
* [delete](/zh-cn/cli/kubecm_delete.md)
* [ls](/zh-cn/cli/kubecm_ls.md)
* [list](/zh-cn/cli/kubecm_list.md)
* [merge](/zh-cn/cli/kubecm_merge.md)
* [namespace](/zh-cn/cli/kubecm_namespace.md)
* [rename](/zh-cn/cli/kubecm_rename.md)
Expand Down
7 changes: 4 additions & 3 deletions docs/zh-cn/cli/kubecm_ls.md → docs/zh-cn/cli/kubecm_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
列举 Context,可以通过后跟关键字,筛选出包含该关键字的 context,支持多关键字筛选,关键字之间是 `` 的关系。

```
kubecm ls
kubecm list
```

### 示例

```
# List all the contexts in your kubeconfig file
kubecm ls
# List all the contexts in your KubeConfig file
kubecm list
# Aliases
kubecm ls
kubecm l
# Filter out keywords(Multi-keyword support)
kubecm ls kind k3s
Expand Down

0 comments on commit 72eceb0

Please sign in to comment.