zsh-users
 help / color / mirror / code / Atom feed
From: Piotr Karbowski <jabberuser@gmail.com>
To: zsh-users@zsh.org
Subject: (temporary) disable bracketed_paste
Date: Fri, 5 May 2017 19:55:14 +0200	[thread overview]
Message-ID: <59e27312-229e-a39f-7257-4b3a190b5c82@gmail.com> (raw)

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.


             reply	other threads:[~2017-05-05 17:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 17:55 Piotr Karbowski [this message]
2017-05-05 20:13 ` Bart Schaefer
2017-05-05 21:32   ` Piotr Karbowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59e27312-229e-a39f-7257-4b3a190b5c82@gmail.com \
    --to=jabberuser@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).