Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bracketed-paste



On Feb 24,  4:55pm, rooom wrote:
}
} How can I bind some key to a widget so that it works with pasted text?

You need the bracketed-paste-magic widget:

    autoload -Uz bracketed-paste-magic
    zle -N bracketed-paste-magic bracketed-paste

There have been some refinements to that (and the related internals) over
the past few releases, so depending on your specific zsh version you may
encounter problems with multibyte characters and widgets bound to some
key sequences, but for most simple usages it should work fine.

You could also turn off bracketed-paste to revert to the old behavior:

    unset zle_bracketed_paste



Messages sorted by: Reverse Date, Date, Thread, Author