fix: correct y-or-n-p typo, clarify link session prompt
- s/y-or-p-n/y-or-n-p/ in hermes-remove-session - Change link-session prompt to 'Link external session (ID, empty to browse)...' to distinguish from SPC p L (remove)
This commit is contained in:
@@ -2171,7 +2171,7 @@ With prefix arg, prompt for remote SSH host (default: lazyworkhorse)."
|
|||||||
"Link an existing Hermes session to the current project.
|
"Link an existing Hermes session to the current project.
|
||||||
If SESSION-ID is empty, show a menu of recent sessions to browse."
|
If SESSION-ID is empty, show a menu of recent sessions to browse."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((id (read-string "Session ID (empty to browse recent): ")))
|
(let ((id (read-string "Link external session (ID, empty to browse recent globally): ")))
|
||||||
(if (string-empty-p id)
|
(if (string-empty-p id)
|
||||||
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
|
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
|
||||||
(lines (split-string output "\n" t))
|
(lines (split-string output "\n" t))
|
||||||
@@ -2244,7 +2244,7 @@ If SESSION-ID is empty, show a menu of recent sessions to browse."
|
|||||||
(choice (completing-read "Remove Hermes session: " items nil t))
|
(choice (completing-read "Remove Hermes session: " items nil t))
|
||||||
(idx (cl-position choice items :test #'string=))
|
(idx (cl-position choice items :test #'string=))
|
||||||
(target (nth idx sessions)))
|
(target (nth idx sessions)))
|
||||||
(when (y-or-p-n (format "Remove \"%s\"? " (plist-get target :title)))
|
(when (y-or-n-p (format "Remove \"%s\"? " (plist-get target :title)))
|
||||||
(let ((kept (cl-remove-if
|
(let ((kept (cl-remove-if
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
(string= (plist-get s :id) (plist-get target :id)))
|
(string= (plist-get s :id) (plist-get target :id)))
|
||||||
|
|||||||
@@ -1367,7 +1367,7 @@ With prefix arg, prompt for remote SSH host (default: lazyworkhorse)."
|
|||||||
"Link an existing Hermes session to the current project.
|
"Link an existing Hermes session to the current project.
|
||||||
If SESSION-ID is empty, show a menu of recent sessions to browse."
|
If SESSION-ID is empty, show a menu of recent sessions to browse."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((id (read-string "Session ID (empty to browse recent): ")))
|
(let ((id (read-string "Link external session (ID, empty to browse recent globally): ")))
|
||||||
(if (string-empty-p id)
|
(if (string-empty-p id)
|
||||||
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
|
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
|
||||||
(lines (split-string output "\n" t))
|
(lines (split-string output "\n" t))
|
||||||
@@ -1440,7 +1440,7 @@ If SESSION-ID is empty, show a menu of recent sessions to browse."
|
|||||||
(choice (completing-read "Remove Hermes session: " items nil t))
|
(choice (completing-read "Remove Hermes session: " items nil t))
|
||||||
(idx (cl-position choice items :test #'string=))
|
(idx (cl-position choice items :test #'string=))
|
||||||
(target (nth idx sessions)))
|
(target (nth idx sessions)))
|
||||||
(when (y-or-p-n (format "Remove \"%s\"? " (plist-get target :title)))
|
(when (y-or-n-p (format "Remove \"%s\"? " (plist-get target :title)))
|
||||||
(let ((kept (cl-remove-if
|
(let ((kept (cl-remove-if
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
(string= (plist-get s :id) (plist-get target :id)))
|
(string= (plist-get s :id) (plist-get target :id)))
|
||||||
|
|||||||
Reference in New Issue
Block a user