When operating as separate Doctor Fates, Inza wears the helmet and Kent's original costume while...

Google on helm separate history

When I press M-p in the Helm prompt for helm-git-grep I get a file path I entered previously in helm-find-files:

What I would really like to see is the pattern I searched with previously in helm-git-grep.

How to make Helm have separate mini-buffer histories for different kinds of Helm (helm-M-x, helm-mini, helm-git-grep and helm-find-files)?

1 Answer 1


Helm has support for different histories which is already used quite heavily in the main helm package as well as some of the 3rd party helms. From the the helm manual:


By default all minibuffer input is pushed to `minibuffer-history',
if an argument HISTORY is provided, input will be pushed to HISTORY.
History element should be a symbol.

For example the helm-apt function calls helm with:

(helm :sources 'helm-source-apt
          :prompt "Search Package: "
          :input query
          :buffer "*helm apt*"
          :history 'helm-apt-input-history)

So you can simply redefine the helm calls to include a reference to a new history variable. In the longer term it might make more sense to submit patches to the various projects to use this feature. For example helm-grep and helm-ag may well want to share generic helm-search-history variable?

  • Ah, so it's an issue with helm-git-grep? I'll try to send them a patch as you suggested. And thanks for the workaround!
    – katspaugh
    Jun 1, 2015 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.