88; ; Homepage: https://github.com/jinnovation/kele.el
99; ; Keywords: kubernetes tools
1010; ; SPDX-License-Identifier: Apache-2.0
11- ; ; Package-Requires: ((emacs "29.1") (async "1.9.7") (dash "2.19.1") (f "0.20.0") (magit-section "4.0.0") memoize (plz "0.8.0") (s "1.13.0") ( yaml "0.5.1"))
11+ ; ; Package-Requires: ((emacs "29.1") (async "1.9.7") (dash "2.19.1") (f "0.20.0") (magit-section "4.0.0") memoize (plz "0.8.0") (yaml "0.5.1"))
1212
1313; ;; Commentary:
1414
2727(require 'magit-section )
2828(require 'memoize )
2929(require 'plz )
30- (require 's )
3130(require 'subr-x )
3231(require 'transient )
3332(require 'treesit )
@@ -283,7 +282,7 @@ Unless SILENT is non-nil, will log the command output."
283282 args)))
284283 (if (= 0 exit-code)
285284 (progn
286- (unless silent (message (s -trim-right (buffer-string ))))
285+ (unless silent (message (string -trim-right (buffer-string ))))
287286 exit-code)
288287 (unless suppress-error (error (buffer-string )))
289288 exit-code))))
@@ -294,7 +293,7 @@ Unless SILENT is non-nil, will log the command output."
294293 `(" --kubeconfig" , kele-kubeconfig-path )
295294 args)))
296295 (make-process
297- :name (format " kele: %s " (s -join " " cmd ))
296+ :name (format " kele: %s " (string -join cmd " " ))
298297 :command cmd
299298 :noquery t )))
300299
@@ -362,13 +361,13 @@ MSG is the progress reporting message to display."
362361 .cluster.server))
363362 (host (url-host (url-generic-parse-url server)))
364363 (port (url-portspec (url-generic-parse-url server))))
365- (s- concat host (if port (format " :%s " port) " " ))))
364+ (concat host (if port (format " :%s " port) " " ))))
366365
367366(cl-defmethod kele--get-resource-lists-for-context ((cache kele--discovery-cache)
368367 &optional context)
369368 " Get all resource lists for CONTEXT from CACHE."
370369 (alist-get
371- (s- replace " :" " _" (kele--get-host-for-context (or context (kele-current-context-name))))
370+ (replace-regexp-in-string " :" " _" (kele--get-host-for-context (or context (kele-current-context-name))))
372371 (oref cache contents)
373372 nil nil (-cut compare-strings <> nil nil <> nil nil t )))
374373
@@ -1243,7 +1242,7 @@ throws an error."
12431242 (oref gvk kind)
12441243 :context context)
12451244 (or namespace (kele--default-namespace-for-context context))))
1246- (url-gv (if (s-contains -p " /" gv)
1245+ (url-gv (if (string-match -p " /" gv)
12471246 (format " apis/%s " gv)
12481247 (format " api/%s " gv)))
12491248 (url-res (format " %s /%s " (oref gvk kind) name))
@@ -1340,10 +1339,11 @@ show the requested Kubernetes object manifest.
13401339 (pcase-dolist (`(, cmd . , desc ) kele--get-mode-command-descriptions)
13411340 (insert (format (propertize " # %s %s\n "
13421341 'font-lock-face 'font-lock-comment-face )
1343- (s-pad-right
1342+ (string-pad
1343+ (substitute-command-keys (format " \\ [%s ]" cmd))
13441344 10
1345- " "
1346- ( substitute-command-keys ( format " \\ [ %s ] " cmd)) )
1345+ nil
1346+ t )
13471347 desc)))))))
13481348
13491349(add-hook 'kele-get-mode-hook #'kele--get-insert-header t )
@@ -1354,7 +1354,7 @@ show the requested Kubernetes object manifest.
13541354Returns a list where the car is the group and the cadr is the version.
13551355
13561356Nil value for group denotes the core API."
1357- (let ((split (s- split " / " group-version)))
1357+ (let ((split (split-string group-version " / " )))
13581358 (if (length= split 1 ) (list nil (car split)) split)))
13591359
13601360(cl-defun kele--tabulate-resources (gvk &key namespace context )
0 commit comments