Skip to content

Commit eb60dd7

Browse files
committed
Fixed a bug that tmux does not open all if too many pods
1 parent 413e04b commit eb60dd7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
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.4
2+
VERSION=0.1.0
33

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

bin/kubectl-tmux_exec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ function main() {
189189
;;
190190
-*)
191191
if [[ "${#opt}" -eq 2 ]]; then
192-
if array_contains "${opt:1}" "${KUBECTL_NOARG_SHORT_OPTS[@]}"; then
193-
kubectl_opts+=("${opt}")
194-
elif array_contains "${opt:1}" "${KUBECTL_SHORT_OPTS[@]}"; then
192+
if array_contains "${opt:1}" "${KUBECTL_SHORT_OPTS[@]}"; then
195193
shift
196194
kubectl_opts+=("${opt}" "$1")
197195
else
@@ -281,12 +279,13 @@ function main() {
281279
else
282280
tmux_commands+=('split-window' "${cmd}" ';')
283281
fi
282+
tmux_commands+=('select-layout' "${tmux_layout}" ';')
284283
done
285284

286285
if [[ "${remain_on_exit}" -eq 1 ]]; then
287286
tmux_commands+=('set-option' 'remain-on-exit' 'on' ';')
288287
fi
289-
tmux_commands+=('select-layout' "${tmux_layout}" ';' 'setw' 'synchronize-panes' 'on' ';')
288+
tmux_commands+=('setw' 'synchronize-panes' 'on' ';')
290289

291290
exec tmux "${tmux_commands[@]}"
292291
}

0 commit comments

Comments
 (0)