add new plugin current-ctx-terminal (#2795)

Co-authored-by: acobo <acobo@opensistemas.com>
mine
Alfonso Cobo Canela 2024-08-16 01:46:32 +02:00 committed by GitHub
parent 54ad9415cc
commit 9e7b8236df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
plugins:
open-terminal:
shortCut: Ctrl-T
confirm: false
description: Open a terminal in the current context
scopes:
- all
command: /usr/bin/sh
background: false
args:
- -c
- bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash"
# New window for terminal can be opened with any emulator
#- x-terminal-emulator -e bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash"
# example with tilix:
#- tilix -e bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash"