On Mon, Jul 26, 2021 at 8:58 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> On 7/26/21, Peter Slížik <peter.slizik@xxxxxxxxx> wrote:
> >
> > zle -N expand-abbreviations _expand_abbreviations
> > bindkey ' ' expand-abbreviations
> >
> > The problem with this solution is that it breaks the way that Ctrl+R
> > history search works.
>
> You can use bindkey -M isearch ' ' self-insert to restore the previous behavior.
I believe you could also do
zle -N magic-space _expand_abbreviations
bindkey ' ' magic-space
because the isearch keymap already understands what (not) to do with
magic-space.