Skip to content

Commit

Permalink
add new plugin current-ctx-terminal (derailed#2795)
Browse files Browse the repository at this point in the history
Co-authored-by: acobo <acobo@opensistemas.com>
  • Loading branch information
2 people authored and uozalp committed Sep 2, 2024
1 parent 347e8cc commit 25ba511
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugins/current-ctx-terminal.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 25ba511

Please sign in to comment.