From 38be7044340130c386ac41b4989ed49bd4470e19 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sat, 18 Mar 2023 00:11:56 +0800 Subject: [PATCH] Revert "Disable bracketed paste for read" This reverts commit 71dc33401089ffd6f8640d0439d3d1b272286ba9. Although this is a partial fix for the problem behaviour, it is too much of a breaking change for my appetite in a minor release. --- share/functions/__fish_config_interactive.fish | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 97557a6a8..7b8b130bd 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -193,10 +193,8 @@ end" >$__fish_config_dir/config.fish # the sequences to bind.expect if not set -q FISH_UNIT_TESTS_RUNNING # Enable bracketed paste before every prompt (see __fish_shared_bindings for the bindings). - # We used to do this for read, but that would break non-interactive use and - # compound commandlines like `read; cat`, because - # it won't disable it after the read. - function __fish_enable_bracketed_paste --on-event fish_prompt + # Enable bracketed paste when the read builtin is used. + function __fish_enable_bracketed_paste --on-event fish_prompt --on-event fish_read printf "\e[?2004h" end @@ -207,9 +205,7 @@ end" >$__fish_config_dir/config.fish # Tell the terminal we support BP. Since we are in __f_c_i, the first fish_prompt # has already fired. - # But only if we're interactive, in case we are in `read` - status is-interactive - and __fish_enable_bracketed_paste + __fish_enable_bracketed_paste end # Similarly, enable TMUX's focus reporting when in tmux.