Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (temporary) disable bracketed_paste
- X-seq: zsh-users 22685
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: (temporary) disable bracketed_paste
- Date: Fri, 5 May 2017 13:13:03 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=a1ROxmHYL3ijpkuwSDQG/Z0PGTApxFsyspMOMCwSjvw=; b=KEJUFDxACG7KkKl01gIsYXhkl0elSMstwkQNDVI2aqCKKIk4abWKrcpb+C3eUkCirQ OK51gTjSyVUkdzlIw1L5lsXXo7ovQ4AsE68wKvFQLmtigtMvqV4RTHaC63ejEgCGUOWZ eJz3BSlpuxegJ8Jl424Jll92dWnEfezMTqb/lcVAVnF8ORrfdm0TEshySIk1sCPvEHbu /d2pNEdr2D/LRFx5LhVXp3whX6nrDD+rF3tbGfdMWixGbZhidXKoHYxNzFmckftUYIX3 MFLxTCfeunaA10bbyHq0I2jgS+fM3NDWMJK+TIVYpstQcupA7i2YhP4YOKSRVU4XjfNN lFfg==
- In-reply-to: <59e27312-229e-a39f-7257-4b3a190b5c82@gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <59e27312-229e-a39f-7257-4b3a190b5c82@gmail.com>
On May 5, 7:55pm, Piotr Karbowski wrote:
}
} 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 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.
zle_bracketed_paste is used when ZLE begins and when ZLE ends, because
it has to be in effect before any paste action occurs.
The value of $zle_bracketed_paste is an array containing the on/off
controls for the feature. So all you need is for example
print -nr ${zle_bracketed_paste[2]} >/dev/tty # Toggle off
{
#
# Do whatever it is you need to do
#
} always {
print -nr ${zle_bracketed_paste[1]} >/dev/tty # Toggle on
}
The "always" is just for sanity in case of early exit from whatever it
is you need to do.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author