mirror of
https://github.com/ahmetb/kubectx.git
synced 2026-05-05 12:41:44 +00:00
Deduplicates code between ShellOp and ReadonlyShellOp by extracting shared logic (context validation, kubeconfig extraction, temp file management, shell spawning) into a shellSession struct. Callers configure behavior via: - printEntry/printExit callbacks for banner messages - extraEnv for additional environment variables - transformKubeconfig hook for kubeconfig transformation (e.g. proxy) Also extracts fzfPickContext for shared interactive mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>