Skip to content

Commit

Permalink
Remove suffix (default) when acting on resources of `StorageClasse…
Browse files Browse the repository at this point in the history
  • Loading branch information
d1egoaz authored Nov 23, 2022
1 parent ca6c3f8 commit 5962d56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kubel.el
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,9 @@ READONLY If true buffer will be in readonly mode(view-mode)."
(defun kubel--get-resource-under-cursor ()
"Utility function to get the name of the resource under the cursor.
Strip the `*` prefix if the resource is selected"
(replace-regexp-in-string
"^\*" "" (aref (tabulated-list-get-entry) 0)))
(string-remove-suffix " (default)" ;; see https://github.com/abrochard/kubel/issues/106
(replace-regexp-in-string
"^\*" "" (aref (tabulated-list-get-entry) 0))))

(defun kubel--get-context-namespace ()
"Utility function to return the proper context and namespace arguments."
Expand Down

0 comments on commit 5962d56

Please sign in to comment.