Skip to content

Commit

Permalink
[Bug] fix #2536
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed committed Feb 15, 2024
1 parent df5f883 commit 2f76223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"os"
"strings"

"github.com/derailed/k9s/internal/client"
"github.com/derailed/k9s/internal/config/data"
Expand Down Expand Up @@ -158,6 +159,10 @@ func (c *Config) SetActiveNamespace(ns string) error {
if err != nil {
return err
}
ff := strings.Fields(ct.View.Active)
if len(ff) == 2 && ns != client.BlankNamespace {
ct.View.Active = ff[0] + " " + ns
}

return ct.Namespace.SetActive(ns, c.settings)
}
Expand Down

0 comments on commit 2f76223

Please sign in to comment.