You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #596, is there a way to change the directory of an arbitrary consult command after we have already entered the prompt?
For example, let's say I'm using consult-find, I can start it with a prefix to prompt for a directory; but if I've already entered consult-find, I can't change the directory I'm searching in.
It would be nice to be able to invoke the directory prompt with some keypress and return to the consult-find command. I can kind of do this via consult-dir, by setting consult-dir-default-command, but not generically - since I don't know how to get the current consult command.
Any suggestions?
The text was updated successfully, but these errors were encountered:
You can adapt the solution from #596. In order to obtain the current command you could store this-command in a minibuffer-setup-hook. See for example Marginalia or Embark which use this technique. Emacs 28 comes with the current-minibuffer-command variable which should hold the relevant command name, but I haven't tried this variable so far.
I'm curious if anyone ever wrote a snippet for this that they'd like to share.
I'm trying to reproduce some muscle-memory from Helm; specifically, helm-rg, which allows me to type M-d when I'm in the middle of a grep to switch into "select a directory" mode.
It would be very convenient if this were something that had a general purpose solution. Unfortunately I'm not much good at ELisp myself.
Similar to #596, is there a way to change the directory of an arbitrary consult command after we have already entered the prompt?
For example, let's say I'm using
consult-find
, I can start it with a prefix to prompt for a directory; but if I've already enteredconsult-find
, I can't change the directory I'm searching in.It would be nice to be able to invoke the directory prompt with some keypress and return to the consult-find command. I can kind of do this via
consult-dir
, by settingconsult-dir-default-command
, but not generically - since I don't know how to get the current consult command.Any suggestions?
The text was updated successfully, but these errors were encountered: