Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit de8356b

Browse files
myan9starpit
authored andcommitted
fix(plugins/plugin-k8s): clicking Previous Log Tab in browser issues _kubectl command in REPL
Fixes #3040
1 parent 4329e24 commit de8356b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/plugin-k8s/src/lib/controller/kubectl.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,11 @@ const executeLocally = (command: string) => (opts: Commands.Arguments<Options>)
565565
]
566566

567567
if (verb === 'logs') {
568+
const directCmd = rawCommand.replace(/^_kubectl(\s)?/, 'kubectl$1').replace(/^_k(\s)?/, 'kubectl$1')
568569
modes.push({
569570
mode: 'previous',
570571
label: strings('previous'),
571-
direct: `${rawCommand} --previous`,
572+
direct: `${directCmd} --previous`,
572573
execOptions: {
573574
exec: 'pexec'
574575
}

0 commit comments

Comments
 (0)