emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/kubed 22d26e327a 3/4: Add transient menu for help in re


From: ELPA Syncer
Subject: [elpa] externals/kubed 22d26e327a 3/4: Add transient menu for help in resource list buffers
Date: Tue, 6 Aug 2024 12:58:32 -0400 (EDT)

branch: externals/kubed
commit 22d26e327a82951bda69ca1370c94e0be2a91b85
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    Add transient menu for help in resource list buffers
    
    * kubed-transient.el (kubed-list-transient): New transient.
    (kubed-list-mode-map): Bind it.
    * kubed.texi (Browse Resources): Document it.
---
 kubed-transient.el | 32 ++++++++++++++++++++++++++++++++
 kubed.el           |  5 ++++-
 kubed.texi         |  4 ++++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/kubed-transient.el b/kubed-transient.el
index 1c12d51050..8f778ad630 100644
--- a/kubed-transient.el
+++ b/kubed-transient.el
@@ -315,5 +315,37 @@
   (transient-setup 'kubed-transient-create-job nil nil
                    :scope '("create" "job")))
 
+;;;###autoload (autoload 'kubed-list-transient "kubed-transient" nil t)
+(transient-define-prefix kubed-list-transient ()
+  "Help for Kubernetes resource list buffers."
+  ["Kubernetes Resources:"
+   ["Select"
+    :pad-keys t
+    ("RET" "Select" kubed-list-select-resource)
+    ("C-o" "Display" kubed-list-display-resource :transient t)
+    ("e" "Edit" kubed-list-edit :transient t)
+    ("w" "Copy name" kubed-list-copy-as-kill :transient t)]
+   ["Delete"
+    ("D" "Delete" kubed-list-delete :transient t)
+    ("d" "Mark" kubed-list-mark-for-deletion :transient t)
+    ("u" "Unmark" kubed-list-unmark :transient t)
+    ("x" "Delete marked" kubed-list-delete-marked :transient t)]
+   ["Other"
+    ("!" "Command line" kubed-list-kubectl-command :transient t)
+    ("+" "Create" kubed-list-create :transient t)
+    ("/" "Filter" kubed-list-set-filter :transient t)
+    ("G" "Update" kubed-list-update :transient t)]
+   ["Table"
+    ("|" "Fit column" kubed-list-fit-column-width-to-content :transient t)
+    ("}" "Widen column" tabulated-list-widen-current-column :transient t)
+    ("{" "Narrow column" tabulated-list-narrow-current-column :transient t)
+    ("S" "Sort" tabulated-list-sort :transient t)]
+   ["Movement"
+    :pad-keys t
+    ("n" "Next line" next-line :transient t)
+    ("p" "Previous line" previous-line :transient t)
+    ("TAB" "Narrow column" kubed-list-next-column :transient t)
+    ("S-TAB" "Narrow column" kubed-list-previous-column :transient t)]])
+
 (provide 'kubed-transient)
 ;;; kubed-transient.el ends here
diff --git a/kubed.el b/kubed.el
index e575a93379..3192c8aa92 100644
--- a/kubed.el
+++ b/kubed.el
@@ -837,6 +837,8 @@ number at point, or the numeric prefix argument if you 
provide one."
   (tabulated-list-print t)
   (tabulated-list-init-header))
 
+(declare-function kubed-list-transient "kubed-transient" ())
+
 (defvar-keymap kubed-list-mode-map
   :doc "Common keymap for Kubernetes resource list buffers."
   "RET" #'kubed-list-select-resource
@@ -858,7 +860,8 @@ number at point, or the numeric prefix argument if you 
provide one."
   "C-S-i" #'kubed-list-previous-column
   "S-TAB" #'kubed-list-previous-column
   "<backtab>" #'kubed-list-previous-column
-  "+" #'kubed-list-create)
+  "+" #'kubed-list-create
+  "?" #'kubed-list-transient)
 
 (defun kubed-list-entries ()
   "`tabulated-list-entries' function for `kubed-list-mode'."
diff --git a/kubed.texi b/kubed.texi
index 3d0187f1d1..295c470fb4 100644
--- a/kubed.texi
+++ b/kubed.texi
@@ -306,6 +306,10 @@ This mode provides the following commands for all 
type-specific
 derived modes:
 
 @table @kbd
+@kindex @key{?}
+@findex kubed-list-transient
+@item @key{?}
+Show help in transient menu (@code{kubed-list-transient}).
 @kindex @key{RET}
 @findex kubed-list-select-resource
 @item @key{RET}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]