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

(temporary) disable bracketed_paste



Hi,

I'd like to know how to temporary disable zle_bracketed_paste. Best would be if I could disable it for a moment, and restore afterward. I have hooked fzy into hotkey via zle, which I use often, however, when I spawn fzy via zle, and paste with middle click, with 'foo' I am getting '[200~foo[201' instead.

I tried to `unset zle_bracketed_paste` but it does work only on the root of .zshrc, if I wrap it within function, it does not do a thing.

Here's my fzy thing

# Insert path selected with fzy into command line on ^F press.
_select_path_with_fzy() {
    local selected_path
    if ! command -v fzy >/dev/null 2>&1; then
        echo 'No fzy binary found in $PATH.'
        return 1
    fi
    echo
    selected_path="$(find -L . | cut -c 3- | fzy)"
    if [ "${selected_path}" ]; then
        LBUFFER+="${(q)selected_path}"
    fi
    zle reset-prompt
}
zle -N _select_path_with_fzy
bindkey "^F" _select_path_with_fzy

-- Piotr.



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