tweak(workspaces): prefill current name on rename

This change uses completing-read to get the new name from the user when
renaming workspaces, to allow them to more easily make a small change to
the existing name of a workspace.
This commit is contained in:
Emily Bourke 2023-07-27 14:35:08 +01:00 committed by Henrik Lissner
parent 2a73bb4e7c
commit fd98b44e6a

View file

@ -221,7 +221,7 @@ workspace."
;;;###autoload
(defun +workspace/rename (new-name)
"Rename the current workspace."
(interactive (list (read-from-minibuffer "New workspace name: ")))
(interactive (list (completing-read "New workspace name: " (list (+workspace-current-name)))))
(condition-case-unless-debug ex
(let* ((current-name (+workspace-current-name))
(old-name (+workspace-rename current-name new-name)))