Skip to content

Commit

Permalink
Update k9s.go
Browse files Browse the repository at this point in the history
Allow additional arguments to be passed to k9s
  • Loading branch information
WeaponX314 authored Oct 23, 2023
1 parent 7cc1201 commit b5d7e5d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cmd/tools/k9s.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ import (

func init() {
k9sCmd := &cobra.Command{
Use: "monitor",
Aliases: []string{"m", "k9s"},
Short: lang.CmdToolsMonitorShort,
Use: "monitor",
Aliases: []string{"m", "k9s"},
Short: lang.CmdToolsMonitorShort,
DisableFlagParsing: true,
Run: func(cmd *cobra.Command, args []string) {
// Hack to make k9s think it's all alone
os.Args = []string{os.Args[0]}
// Pass the rest of the arguments to k9s
os.Args = append(os.Args, args...)
k9s.Execute()
},
}
Expand Down

0 comments on commit b5d7e5d

Please sign in to comment.