zsh-users
 help / color / mirror / code / Atom feed
* (temporary) disable bracketed_paste
@ 2017-05-05 17:55 Piotr Karbowski
  2017-05-05 20:13 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Karbowski @ 2017-05-05 17:55 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-05 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 17:55 (temporary) disable bracketed_paste Piotr Karbowski
2017-05-05 20:13 ` Bart Schaefer
2017-05-05 21:32   ` Piotr Karbowski

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).