Skip to content

Commit 232bda9

Browse files
committed
Renamed tmux exec to tmux-exec
1 parent 1a66305 commit 232bda9

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME=kubectl-tmux-exec
2-
VERSION=0.0.1
2+
VERSION=0.0.2
33

44
OUTPUT_DIR=output
55
RELEASE_FILE_NAME=$(NAME)-$(VERSION).tar.gz

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Instead of `exec bash` into multiple pod's containers one-at-a-time, like `kubec
99
You can now use
1010

1111
```sh
12-
kubectl tmux exec -it -l app=nginx /bin/bash
12+
kubectl tmux-exec -it -l app=nginx /bin/bash
1313
```
1414

1515
# Installation via Homebrew
@@ -22,11 +22,11 @@ After that, execute the command below.
2222
brew install predatorray/brew/kubectl-tmux-exec
2323
```
2424

25-
The script should be installed under `/usr/local/bin/kubectl-tmux-exec` by default. Please ensure the `bin` directory is in your `$PATH` environment variable.
25+
The script should be installed under `/usr/local/bin/kubectl-tmux_exec` by default. Please ensure the `bin` directory is in your `$PATH` environment variable.
2626

2727
# Usage
2828

29-
To execute this script as a [plugin]((https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)), a `kubectl` version prior to `1.12.0` is required and the latest version is preferred. But you can execute the script directly like `kubectl-tmux-exec [...ARGS]` if it is not supported.
29+
To execute this script as a [plugin]((https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)), a `kubectl` version prior to `1.12.0` is required and the latest version is preferred. But you can execute the script directly like `kubectl-tmux_exec [...ARGS]` if it is not supported.
3030

3131
If it is supported, you can check if the script has been added to kubectl's plugin list by
3232

@@ -39,31 +39,31 @@ The output should be like
3939
```txt
4040
The following compatible plugins are available:
4141
42-
/usr/local/bin/kubectl-tmux-exec
42+
/usr/local/bin/kubectl-tmux_exec
4343
```
4444

4545
If it does not show in the list, check `$PATH` env again.
4646

4747
You can use the command below to get the usage of the script.
4848

4949
```sh
50-
kubectl tmux exec --help
50+
kubectl tmux-exec --help
5151
```
5252

5353
Or, execute it directly.
5454

5555
```
56-
kubectl-tmux-exec --help
56+
kubectl-tmux_exec --help
5757
```
5858

5959
## Example
6060

61-
The `tmux exec` is similar to `exec`, except that it requires label selectors while `exec` requires a pod name.
61+
The `tmux-exec` is similar to `exec`, except that it requires label selectors while `exec` requires a pod name.
6262

6363
To `bash` into all pod containers that share some common labels, `foo=bar` for instance.
6464

6565
```sh
66-
kubectl tmux exec -it -l foo=bar /bin/bash
66+
kubectl tmux-exec -it -l foo=bar /bin/bash
6767
```
6868

6969
It should be noted that the `-i` / `--stdin` and `-t` / `--tty` options must both be turned on when you are trying to initiate an interactive session. If not, there will not be any errors. Instead, the `tmux` process simply exits because the `exec`-ed command exits due to no inputs.

bin/kubectl-tmux-exec renamed to bin/kubectl-tmux_exec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
set -euf -o pipefail
2323

24-
readonly PROG_NAME='kubectl tmux exec'
24+
readonly PROG_NAME='kubectl tmux-exec'
2525

2626
declare -ra KUBECTL_SHORT_OPTS=(
2727
'n'
@@ -39,6 +39,7 @@ declare -ra KUBECTL_LONG_OPTS=(
3939
'token'
4040
'user'
4141
'username'
42+
'kubeconfig'
4243
)
4344

4445
declare -ra KUBECTL_NOARG_LONG_OPTS=(

0 commit comments

Comments
 (0)