mirror of
https://github.com/skoelle/kctl-tui.git
synced 2026-09-18 12:30:25 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8546ac9bf2 |
@@ -89,7 +89,8 @@ not cover: **redeploy** and **secrets diff**.
|
|||||||
Example startup command (generic placeholders):
|
Example startup command (generic placeholders):
|
||||||
|
|
||||||
```
|
```
|
||||||
tmux kill-session -t kctl \; \
|
# Kill stale session first (separate command — tmux aborts on kill-session error).
|
||||||
|
tmux kill-session -t kctl
|
||||||
tmux new-session -d -s kctl \
|
tmux new-session -d -s kctl \
|
||||||
-- "kctl-tui panel --context=$CTX_A --ns=$NS --team=$TEAM" \; \
|
-- "kctl-tui panel --context=$CTX_A --ns=$NS --team=$TEAM" \; \
|
||||||
set-option -t kctl remain-on-exit on \; \
|
set-option -t kctl remain-on-exit on \; \
|
||||||
|
|||||||
@@ -277,8 +277,10 @@ func (m *fullModel) startTmuxSession() tea.Cmd {
|
|||||||
ctxA := m.cfg.ResolveContext(envA, m.selectedContext)
|
ctxA := m.cfg.ResolveContext(envA, m.selectedContext)
|
||||||
k9sCmdA := fmt.Sprintf("k9s --context %s -n %s", ctxA, m.selectedNamespace)
|
k9sCmdA := fmt.Sprintf("k9s --context %s -n %s", ctxA, m.selectedNamespace)
|
||||||
|
|
||||||
|
// Kill stale session first (ignore error if none exists).
|
||||||
|
exec.Command("tmux", "kill-session", "-t", "kctl").Run()
|
||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"kill-session", "-t", "kctl", ";", // ignore error if no session exists
|
|
||||||
"new-session", "-d", "-s", "kctl",
|
"new-session", "-d", "-s", "kctl",
|
||||||
"--", panelCmd, ";",
|
"--", panelCmd, ";",
|
||||||
"set-option", "-t", "kctl", "remain-on-exit", "on", ";",
|
"set-option", "-t", "kctl", "remain-on-exit", "on", ";",
|
||||||
|
|||||||
Reference in New Issue
Block a user