I'm still getting used to Spacemacs' configuration, so I'll focus less on where it should go and more on what Emacs needs.
(defun shell-in-directory ()
(let* ((orig-default-dir default-directory)
(default-directory (read-string "Directory: " orig-default-directory)))
M-x shell-in-directory will prompt you for the desired directory, defaulting to the current
I tried adding a custom keybinding for
SPC " like this, but it fails saying SPC isn't a prefix key.
(global-set-key (kbd "SPC \"") #'shell-in-directory)
Adapt as necessary to Spacemacs conventions for adding or overriding leader bindings.