From cf9efd84cbcc88d43e2e438a20552c796d8ac8e5 Mon Sep 17 00:00:00 2001 From: 依云 Date: Tue, 25 Mar 2025 19:31:27 +0800 Subject: feat(zsh): re-enable bracketed paste (#2646) * feat(zsh): re-enable bracketed paste atuin will reset it so after exiting atuin without executing a command, bracketed paste mode is disabled until a command is executed. This breaks e.g. the bracketed-paste-url-magic widget. This change will re-enable it if it's enabled; when it's disabled or unavailable, $zle_bracketed_paste[1] will be empty string. * silent shellcheck --- crates/atuin/src/shell/atuin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/atuin/src/shell/atuin.zsh b/crates/atuin/src/shell/atuin.zsh index 7d69d762..be29de27 100644 --- a/crates/atuin/src/shell/atuin.zsh +++ b/crates/atuin/src/shell/atuin.zsh @@ -59,6 +59,9 @@ _atuin_search() { output=$(ATUIN_SHELL_ZSH=t ATUIN_LOG=error ATUIN_QUERY=$BUFFER atuin search $* -i 3>&1 1>&2 2>&3) zle reset-prompt + # re-enable bracketed paste + # shellcheck disable=SC2154 + echo ${zle_bracketed_paste[1]} >/dev/tty if [[ -n $output ]]; then RBUFFER="" -- cgit v1.3.1