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:
2026-07-18 19:09:25 -04:00
parent 7d853c39c2
commit baa7441f3b
2 changed files with 4 additions and 4 deletions

View File

@@ -2171,7 +2171,7 @@ With prefix arg, prompt for remote SSH host (default: lazyworkhorse)."
"Link an existing Hermes session to the current project.
If SESSION-ID is empty, show a menu of recent sessions to browse."
(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)
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
(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))
(idx (cl-position choice items :test #'string=))
(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
(lambda (s)
(string= (plist-get s :id) (plist-get target :id)))

View File

@@ -1367,7 +1367,7 @@ With prefix arg, prompt for remote SSH host (default: lazyworkhorse)."
"Link an existing Hermes session to the current project.
If SESSION-ID is empty, show a menu of recent sessions to browse."
(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)
(let* ((output (shell-command-to-string "hermes sessions list --limit 50 2>&1"))
(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))
(idx (cl-position choice items :test #'string=))
(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
(lambda (s)
(string= (plist-get s :id) (plist-get target :id)))