Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jul 8, 2018
1 parent 7b808d2 commit 9741f69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ export TERMINAL_ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -

## Binary

Go to the [releases](https://github.com/sbueringer/kubectx/releases) page and download the Linux or Windows version. Put the binary to somewhere you want (on UNIX-ish systems, /usr/local/bin or the like). Make sure it has execution bit set. If you want, you can add symlinks to `kcfg`, `kctx` and kns, e.g.:
Go to the [releases](https://github.com/sbueringer/kubectx/releases) page and download the Linux or Windows version. Put the binary to somewhere you want (on UNIX-ish systems, /usr/local/bin or the like). Make sure it has execution bit set. If you want, you can shortcuts to `kcfg`, `kctx` and `kns`, e.g.:

````
# kcfg = kubectx confg
ln -s /usr/local/bin/kubectx /usr/local/bin/kcfg
# kctx = kubectx context
ln -s /usr/local/bin/kubectx /usr/local/bin/kctx
# kns = kubectx namespace
ln -s /usr/local/bin/kubectx /usr/local/bin/kns
function kcfg() { kubectx config "$@" }
function kctx() { kubectx context "$@" }
function kns() { kubectx namespace "$@" }
````
## Auto completion

Expand Down
13 changes: 0 additions & 13 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@ var rootCmd = &cobra.Command{
Long: `kubectx manages kubectl context incl. kubeconfig, context and namespace`,
ValidArgs: []string{"config", "context", "namespace"} ,
Run: func(cmd *cobra.Command, args []string) {

binName := os.Args[0]

if binName == "kcfg" {
configCmd.Run(cmd, args)
return
} else if binName == "kctx" {
contextCmd.Run(cmd, args)
return
} else if binName == "kns" {
namespaceCmd.Run(cmd, args)
return
}
cmd.Help()
},
}
Expand Down

0 comments on commit 9741f69

Please sign in to comment.