Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oantolin/completing-history

Insert history items with completion
https://github.com/oantolin/completing-history

Last synced: 12 days ago
JSON representation

Insert history items with completion

Awesome Lists containing this project

README

        

This package provides a command =completing-history-insert-item= to
insert an item from history using completion. It calls =completing-read=
to do this, meaning it will work with your preferred completion
framework. The package supports: the minibuffer, eshell, comint and
term.

There is also a function =completing-history-setup-keybinding= to setup
a keybinding for you in all supported contexts. By default it binds
=completing-history-insert-item= to =M-r= (usually bound to a command that
gets the previous history item matching a regexp) and unbinds the
companion =M-s= command (usually bound to a command that searches
forward in the history).

To customize the binding of =completing-history-insert-item=, use
=completing-history-binding=. To keep =M-s= from being unbound customize
=completing-history-unbind-M-s=.

* Will this be put on MELPA?

Sorry, there are no plans to put this on MELPA.

If you prefer packages on MELPA, you can use the =consult-history=
command from [[https://github.com/minad/consult][Consult]] instead of the =completing-history-insert-item=
command from this package. By design, Consult does not setup any key
bindings for you. You can get the effect of =(completing-history-setup-keybinding)= by binding =consult-history= to =M-r= and unbinding =M-s= in each of the following keymaps:

- =minibuffer-local-map=
- =eshell-hist-mode-map= if you are on Emacs >=27, and =esh-mode-map= for
Emacs <27. Note that if you are on Emacs <27 and want to bind
something in =esh-mode-map= you need to do it in the
=eshell-mode-hook=!
- =shell-mode-map=
- =term-mode-map=
- =term-raw-map=
- =comint-mode-map=
- =slime-repl-mode-map=