Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4e2e0b1
Spike: evidence that a real key-binding context fixes ctrl-r handoff …
warp-agent-staging[bot] Aug 25, 2026
1faad18
Prototype: hand ctrl-r to a shell-native wrapper widget via raw keypr…
warp-agent-staging[bot] Aug 25, 2026
0a15314
Fix 3 blocking review findings: key sequence, keymap coverage, stuck-…
warp-agent-staging[bot] Aug 25, 2026
1bad70e
Fix 4 more review findings: mode-aware capability, unique handoff IDs…
warp-agent-staging[bot] Aug 25, 2026
1451b63
zsh: classify ^R by widget registration, not a hardcoded default-name…
warp-agent-staging[bot] Aug 25, 2026
b371c8e
raw-keypress ctrl-r handoff: add per-handoff completion token protocol
warp-agent-staging[bot] Aug 25, 2026
d715fd0
raw-keypress ctrl-r handoff: redetermine focus when the handoff starts
warp-agent-staging[bot] Aug 25, 2026
441c833
raw-keypress ctrl-r handoff: focus_terminal directly instead of redet…
warp-agent-staging[bot] Aug 25, 2026
def3558
raw-keypress ctrl-r handoff: lengthen inactivity bail-out to tolerate…
warp-agent-staging[bot] Aug 26, 2026
48d33b6
raw-keypress ctrl-r handoff: prevent a stray post-bailout Enter from …
warp-agent-staging[bot] Aug 26, 2026
2649198
raw-keypress ctrl-r handoff: cancel the bail-out timer outright once …
warp-agent-staging[bot] Aug 26, 2026
d18b388
raw-keypress ctrl-r handoff: replace flawed output-inference cancella…
warp-agent-staging[bot] Aug 26, 2026
e0e7486
raw-keypress ctrl-r handoff: make the started-signal timer cancellati…
warp-agent-staging[bot] Aug 26, 2026
2729071
raw-keypress ctrl-r: withhold partial keymap capability
warp-agent-staging[bot] Aug 26, 2026
e02f3c4
chore: restore executable bit on raw_keypress_ctrl_r_matrix.py
warp-agent-staging[bot] Aug 26, 2026
ac009bc
raw-keypress ctrl-r: cover fish vi-insert collision; finish comment c…
warp-agent-staging[bot] Aug 26, 2026
9101000
raw-keypress ctrl-r: assert the unoccupied fish mode still claims Alt-]
warp-agent-staging[bot] Aug 26, 2026
62e06fd
raw-keypress ctrl-r matrix: fix vacuous 'unoccupied mode still claims…
warp-agent-staging[bot] Aug 26, 2026
8288924
raw-keypress ctrl-r matrix: fix remaining vacuous binding assertions
warp-agent-staging[bot] Aug 26, 2026
e0a4dfe
raw-keypress ctrl-r matrix: state the session.buf echo trap once
warp-agent-staging[bot] Aug 26, 2026
21ac9a4
raw-keypress ctrl-r matrix: trim the occupied-insert comments
warp-agent-staging[bot] Aug 26, 2026
a485230
Merge master (warp_terminal crate extraction) into core-3807-raw-keyp…
warp-agent-staging[bot] Aug 26, 2026
a75c0c9
raw-keypress ctrl-r: fix zsh <5.1 bootstrap crash in keyseq_free's lo…
warp-agent-staging[bot] Aug 26, 2026
1ccd207
Correct the zsh <5.1 mechanism in the keyseq_free comment
warp-agent-staging[bot] Aug 26, 2026
0dc4e19
raw-keypress ctrl-r matrix: guard the old-zsh word-split fix statically
warp-agent-staging[bot] Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,7 @@ git_credential_refresh = []
prompt_cache_expiry_warning = []
osc_hyperlinks = []
ctrl_c_cancels_third_party_harness = []
raw_keypress_ctrl_r_handoff = []

[package.metadata.bundle.bin.warp-oss]
category = "public.app-category.developer-tools"
Expand Down
153 changes: 150 additions & 3 deletions app/assets/bundled/bootstrap/bash_body.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,148 @@ esac

shell_plugins=()

# Prototype (alternative to the foreground-command handoff in PR #15513): if the user has
# rebound ctrl-r to a `bind -x` function in one or more of bash's readline keymaps (as fzf
# and atuin both do), install a wrapper on the private key sequence Alt-] in that same keymap
# that re-invokes that keymap's own binding from inside a genuine readline key-binding
# context, giving it access to READLINE_LINE. Warp writes that sequence to the pty instead of
# a bare ^R when this session reports the `external_ctrl_r_raw_keypress` tag below. Not
# supported under MSYS2, where ctrl-r always falls through to Warp's own command search.
#
# Bash has no equivalent of zsh's `zle-keymap-select` hook, so Warp cannot tell which keymap
# is active when ctrl-r is pressed and `shell_plugins` cannot vary per keymap -- it is one
# session-wide flag. The tag is therefore only set once every relevant keymap has safely
# claimed Alt-] (with either a real wrapper or an empty-completion fallback); if any keymap
# already has a real binding there, we leave that keymap alone and withhold the tag entirely,
# since sending the private sequence into an occupied keymap would invoke the user's unrelated
# binding instead. An unqualified `bind -x` (no `-m`) only installs into whichever keymap is
# current at that moment, so each keymap below is bound explicitly with `-m`.
#
# A readline macro (installed by fzf on bash < 4) or a plain readline function name cannot be
# re-invoked this way, so those configurations are left undetected and fall back to Warp's own
# command search on ctrl-r.
__warp_classify_raw_keypress_ctrl_r_binding() { # keymap
local line
line=$(bind -m "$1" -X 2>/dev/null | command -p grep -F '"\C-r"' | command -p head -1)
[[ -n $line ]] || return 1
line=${line#*: }
line=${line#\"}
printf '%s' "${line%\"}"
}

# Returns success if Alt-] is not already bound to anything (function or exec) in the given
# keymap, i.e. it's safe for us to claim it there.
__warp_raw_keypress_ctrl_r_keyseq_free() { # keymap
! { bind -m "$1" -p 2>/dev/null; bind -m "$1" -X 2>/dev/null; } | command -p grep -qF '"\e]"'
}

# Reports the outcome of a raw-keypress ctrl-r handoff back to Warp. `token` is the decimal
# handoff id Warp pasted into the line buffer to start this handoff (see
# `raw_keypress_ctrl_r_handoff_payload` in view.rs); Warp echoes it back to the pending
# handoff it started, rejecting the report if they don't match. `selection` is the command
# text the user selected, or empty if they cancelled.
__warp_report_raw_keypress_ctrl_r_selection() { # token, selection
local escaped_token="$(warp_escape_json "$1")"
local escaped_selection="$(warp_escape_json "$2")"
warp_send_json_message "{ \"hook\": \"ExternalCtrlRRawKeypressSelection\", \"value\": { \"buffer\": \"$escaped_selection\", \"token\": \"$escaped_token\", \"session_id\": $WARP_SESSION_ID } }"
}

# Reports that the real ctrl-r widget is actually about to run for this handoff. Sent
# before invoking it, so Warp has positive proof the wrapper is alive and can stop
# bounding the handoff by a fixed inactivity timeout -- unlike inferring liveness from pty
# output, which this token's own bracketed-paste echo would otherwise produce even when
# nothing is bound to the private key sequence at all.
__warp_report_raw_keypress_ctrl_r_started() { # token
local escaped_token="$(warp_escape_json "$1")"
warp_send_json_message "{ \"hook\": \"ExternalCtrlRRawKeypressStarted\", \"value\": { \"token\": \"$escaped_token\", \"session_id\": $WARP_SESSION_ID } }"
}

# Fallback binding target for a keymap with no real ctrl-r widget to re-invoke: the pasted
# token is sitting alone in the line buffer (nothing else runs), so report it immediately
# with an empty selection.
__warp_report_raw_keypress_ctrl_r_selection_immediate() {
local token="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_selection "$token" ''
}

# READLINE_LINE/READLINE_POINT are live globals for the duration of a `bind -x` binding, so
# the eval'd widget's assignments are visible here and readline picks them up when we return.
# A distinct function per keymap (rather than one shared function) is required because each
# keymap can capture a different original binding (e.g. atuin's emacs vs. vi-insert widgets).
#
# The token is captured and the buffer cleared *before* the real widget runs: the buffer
# holds the pasted token at that point, and after the widget runs it holds the selection
# instead.
__warp_run_raw_keypress_ctrl_r_widget_emacs() {
local token="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_started "$token"
eval "$__warp_raw_keypress_ctrl_r_orig_emacs"
local selection="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_selection "$token" "$selection"
}
__warp_run_raw_keypress_ctrl_r_widget_vi_insert() {
local token="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_started "$token"
eval "$__warp_raw_keypress_ctrl_r_orig_vi_insert"
local selection="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_selection "$token" "$selection"
}
__warp_run_raw_keypress_ctrl_r_widget_vi_command() {
local token="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_started "$token"
eval "$__warp_raw_keypress_ctrl_r_orig_vi_command"
local selection="$READLINE_LINE"
READLINE_LINE=''
READLINE_POINT=0
__warp_report_raw_keypress_ctrl_r_selection "$token" "$selection"
}

if [ "$WARP_IN_MSYS2" = false ]; then
__warp_raw_keypress_ctrl_r_all_keymaps_safe=1
if __warp_raw_keypress_ctrl_r_keyseq_free emacs; then
if __warp_raw_keypress_ctrl_r_orig_emacs=$(__warp_classify_raw_keypress_ctrl_r_binding emacs); then
bind -m emacs -x '"\e]": __warp_run_raw_keypress_ctrl_r_widget_emacs'
else
bind -m emacs -x '"\e]": __warp_report_raw_keypress_ctrl_r_selection_immediate'
fi
else
__warp_raw_keypress_ctrl_r_all_keymaps_safe=0
fi
if __warp_raw_keypress_ctrl_r_keyseq_free vi-insert; then
if __warp_raw_keypress_ctrl_r_orig_vi_insert=$(__warp_classify_raw_keypress_ctrl_r_binding vi-insert); then
bind -m vi-insert -x '"\e]": __warp_run_raw_keypress_ctrl_r_widget_vi_insert'
else
bind -m vi-insert -x '"\e]": __warp_report_raw_keypress_ctrl_r_selection_immediate'
fi
else
__warp_raw_keypress_ctrl_r_all_keymaps_safe=0
fi
if __warp_raw_keypress_ctrl_r_keyseq_free vi-command; then
if __warp_raw_keypress_ctrl_r_orig_vi_command=$(__warp_classify_raw_keypress_ctrl_r_binding vi-command); then
bind -m vi-command -x '"\e]": __warp_run_raw_keypress_ctrl_r_widget_vi_command'
else
bind -m vi-command -x '"\e]": __warp_report_raw_keypress_ctrl_r_selection_immediate'
fi
else
__warp_raw_keypress_ctrl_r_all_keymaps_safe=0
fi
if [ "$__warp_raw_keypress_ctrl_r_all_keymaps_safe" = 1 ]; then
shell_plugins+=(external_ctrl_r_raw_keypress)
fi
fi

function warp_bootstrapped () {
local aliases="`alias`"
local env_var_names="`compgen -e`"
Expand Down Expand Up @@ -1388,8 +1530,13 @@ esac
shell_plugins+=("starship")
fi

# Join into a newline-separated list (one tag per line, matching zsh's `print -l --`)
# before escaping -- "$shell_plugins" alone would only expand to the array's first
# element.
local shell_plugins_list="$(printf '%s\n' "${shell_plugins[@]}")"

if [ "$WARP_IN_MSYS2" = false ]; then
local escaped_shell_plugins=$(warp_escape_json "$shell_plugins")
local escaped_shell_plugins=$(warp_escape_json "$shell_plugins_list")
local escaped_path="$(warp_escape_json "$PATH")"
local escaped_shell_options=$(warp_escape_json "$shell_options")
fi
Expand All @@ -1412,7 +1559,7 @@ esac
warp_send_hook_kv_pair_escaped "function_names" "$function_names"
warp_send_hook_kv_pair_escaped "builtins" "$builtins"
warp_send_hook_kv_pair_escaped "keywords" "$keywords"
warp_send_hook_kv_pair "shell_plugins" "$shell_plugins"
warp_send_hook_kv_pair_escaped "shell_plugins" "$shell_plugins_list"
warp_send_hook_kv_pair "shell_version" "$BASH_VERSION"
warp_send_hook_kv_pair "shell_options" "$shell_options"
warp_send_hook_kv_pair "rcfiles_start_time" "$rcfiles_start_time"
Expand All @@ -1427,7 +1574,7 @@ esac
local escaped_editor="$(warp_escape_json "$EDITOR")"
local escaped_shell_path="$(warp_escape_json "$BASH")"
local escaped_cdpath="$(warp_escape_json "$CDPATH")"
local escaped_json="{\"hook\": \"Bootstrapped\", \"value\": {\"histfile\": \"$escaped_histfile\", \"session_id\": $WARP_SESSION_ID, \"shell\": \"bash\", \"home_dir\": \"$HOME\", \"user\":\"$_user\", \"host\":\"$_hostname\", \"path\": \"$escaped_path\", \"cdpath\": \"$escaped_cdpath\", \"editor\": \"$escaped_editor\", \"env_var_names\": \"$escaped_env_var_names\", \"abbreviations\": \"$escaped_abbrs\", \"aliases\": \"$escaped_aliases\", \"function_names\": \"$escaped_function_names\", \"builtins\": \"$escaped_builtins\", \"keywords\": \"$escaped_keywords\", \"shell_version\": \"$BASH_VERSION\", \"shell_options\": \"$escaped_shell_options\", \"rcfiles_start_time\": \"$rcfiles_start_time\", \"rcfiles_end_time\": \"$rcfiles_end_time\", \"vi_mode_enabled\": \"$vi_mode_enabled\", \"os_category\": \"$os_category\", \"linux_distribution\": \"$linux_distribution\", \"wsl_name\": \"$WSL_DISTRO_NAME\", \"shell_path\": \"$escaped_shell_path\"}}"
local escaped_json="{\"hook\": \"Bootstrapped\", \"value\": {\"histfile\": \"$escaped_histfile\", \"session_id\": $WARP_SESSION_ID, \"shell\": \"bash\", \"home_dir\": \"$HOME\", \"user\":\"$_user\", \"host\":\"$_hostname\", \"path\": \"$escaped_path\", \"cdpath\": \"$escaped_cdpath\", \"editor\": \"$escaped_editor\", \"env_var_names\": \"$escaped_env_var_names\", \"abbreviations\": \"$escaped_abbrs\", \"aliases\": \"$escaped_aliases\", \"function_names\": \"$escaped_function_names\", \"builtins\": \"$escaped_builtins\", \"keywords\": \"$escaped_keywords\", \"shell_version\": \"$BASH_VERSION\", \"shell_options\": \"$escaped_shell_options\", \"rcfiles_start_time\": \"$rcfiles_start_time\", \"rcfiles_end_time\": \"$rcfiles_end_time\", \"shell_plugins\": \"$escaped_shell_plugins\", \"vi_mode_enabled\": \"$vi_mode_enabled\", \"os_category\": \"$os_category\", \"linux_distribution\": \"$linux_distribution\", \"wsl_name\": \"$WSL_DISTRO_NAME\", \"shell_path\": \"$escaped_shell_path\"}}"
warp_send_json_message "$escaped_json"
fi
}
Expand Down
130 changes: 129 additions & 1 deletion app/assets/bundled/bootstrap/fish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,133 @@ function warp_escape_json
string join \n $argv | command sed -E 's/(["\\\\])/\\\\\\1/g; s/'\b'/\\\\b/g; s/'\t'/\\\\t/g; s/'\f'/\\\\f/g; s/'\r'/\\\\r/g; $!s/$/\\\\n/' | command tr -d '\n'
end

# Tags for shell configurations Warp needs to know about, matching the `shell_plugins` list bash
# and zsh already report.
set -g shell_plugins

# Prototype (alternative to the foreground-command handoff in PR #15513): if the user has rebound
# ctrl-r away from fish's own history search in one or more of fish's bind modes ("default", and
# "insert" once `fish_vi_key_bindings` is loaded), install a wrapper in that same mode on the
# private key sequence Alt-] that re-invokes that mode's own binding from inside a real `bind`
# context. Both fzf's and atuin's fish widgets write their result back with the `commandline`
# builtin, which fails with status 1 outside an interactive-editing context, so invoking the
# user's binding from this wrapper is what makes fish work at all. Warp writes that sequence to
# the pty instead of a bare ^R when this session reports the `external_ctrl_r_raw_keypress` tag
# below.
#
# Warp cannot tell which mode is active when ctrl-r is pressed, so `shell_plugins` cannot vary
# per mode -- it is one session-wide flag. The tag is therefore only set once every relevant mode
# has safely claimed Alt-] (with either a real wrapper or an empty-completion fallback); if any
# mode already has a real binding there, we leave that mode alone and withhold the tag entirely,
# since sending the private sequence into an occupied mode would invoke the user's unrelated
# binding instead.
#
# `bind` lists fish's own defaults with a `--preset` flag, so any binding without it is one the
# user (or a plugin like fzf or atuin) installed.
function __warp_raw_keypress_ctrl_r_widget # mode
set -l widget ""
for binding in (bind -M $argv[1] \cr 2>/dev/null)
if string match --quiet -- 'bind --preset *' "$binding"
continue
end
# Strip the leading `bind [-M <mode>] <key>`, leaving just the widget/command.
set widget (string replace --regex -- '^bind (-M \S+ +)?\S+ +' '' "$binding")
end
test -n "$widget"; or return 1
echo "$widget"
end

# Returns success if Alt-] is not already bound to anything in the given mode, i.e. it's safe
# for us to claim it there.
function __warp_raw_keypress_ctrl_r_keyseq_free # mode
not bind -M $argv[1] \x1b\x5d >/dev/null 2>&1
end

# Reports the outcome of a raw-keypress ctrl-r handoff back to Warp. `$argv[1]` is the decimal
# handoff id Warp pasted into the line buffer to start this handoff (see
# `raw_keypress_ctrl_r_handoff_payload` in view.rs); Warp echoes it back to the pending handoff
# it started, rejecting the report if they don't match. `$argv[2]` is the command text the user
# selected, or empty if they cancelled.
function __warp_report_raw_keypress_ctrl_r_selection # token selection
set -l escaped_token (warp_escape_json "$argv[1]")
set -l escaped_selection (warp_escape_json "$argv[2]")
warp_send_json_message "{ \"hook\": \"ExternalCtrlRRawKeypressSelection\", \"value\": { \"buffer\": \"$escaped_selection\", \"token\": \"$escaped_token\", \"session_id\": $WARP_SESSION_ID } }"
end

# Reports that the real ctrl-r widget is actually about to run for this handoff. Sent before
# invoking it, so Warp has positive proof the wrapper is alive and can stop bounding the
# handoff by a fixed inactivity timeout -- unlike inferring liveness from pty output, which
# this token's own bracketed-paste echo would otherwise produce even when nothing is bound to
# the private key sequence at all.
function __warp_report_raw_keypress_ctrl_r_started # token
set -l escaped_token (warp_escape_json "$argv[1]")
warp_send_json_message "{ \"hook\": \"ExternalCtrlRRawKeypressStarted\", \"value\": { \"token\": \"$escaped_token\", \"session_id\": $WARP_SESSION_ID } }"
end

# Fallback binding target for a mode with no real ctrl-r widget to re-invoke: the pasted token
# is sitting alone in the command line (nothing else runs), so report it immediately with an
# empty selection.
function __warp_report_raw_keypress_ctrl_r_selection_immediate
set -l token (commandline)
# Warp owns the command from here; the shell's own buffer must not keep a copy, or the
# next Enter would submit it twice.
commandline ''
commandline -f repaint
__warp_report_raw_keypress_ctrl_r_selection "$token" ''
end

set -g __warp_raw_keypress_ctrl_r_all_modes_safe 1

if __warp_raw_keypress_ctrl_r_keyseq_free default
set -g __warp_raw_keypress_orig_ctrl_r_default (__warp_raw_keypress_ctrl_r_widget default)
if test -n "$__warp_raw_keypress_orig_ctrl_r_default"
# The token is captured and the command line cleared *before* the real widget runs: it
# holds the pasted token at that point, and after the widget runs it holds the selection
# instead.
function __warp_run_raw_keypress_ctrl_r_widget_default
set -l token (commandline)
commandline ''
__warp_report_raw_keypress_ctrl_r_started "$token"
eval $__warp_raw_keypress_orig_ctrl_r_default
set -l selection (commandline)
commandline ''
commandline -f repaint
__warp_report_raw_keypress_ctrl_r_selection "$token" "$selection"
end
bind -M default \x1b\x5d __warp_run_raw_keypress_ctrl_r_widget_default
else
bind -M default \x1b\x5d __warp_report_raw_keypress_ctrl_r_selection_immediate
end
else
set -g __warp_raw_keypress_ctrl_r_all_modes_safe 0
end

# The "insert" mode only exists once `fish_vi_key_bindings` has been loaded.
if bind -M insert > /dev/null 2>&1; and __warp_raw_keypress_ctrl_r_keyseq_free insert
set -g __warp_raw_keypress_orig_ctrl_r_insert (__warp_raw_keypress_ctrl_r_widget insert)
if test -n "$__warp_raw_keypress_orig_ctrl_r_insert"
function __warp_run_raw_keypress_ctrl_r_widget_insert
set -l token (commandline)
commandline ''
__warp_report_raw_keypress_ctrl_r_started "$token"
eval $__warp_raw_keypress_orig_ctrl_r_insert
set -l selection (commandline)
commandline ''
commandline -f repaint
__warp_report_raw_keypress_ctrl_r_selection "$token" "$selection"
end
bind -M insert \x1b\x5d __warp_run_raw_keypress_ctrl_r_widget_insert
else
bind -M insert \x1b\x5d __warp_report_raw_keypress_ctrl_r_selection_immediate
end
else if bind -M insert > /dev/null 2>&1
set -g __warp_raw_keypress_ctrl_r_all_modes_safe 0
end

if test "$__warp_raw_keypress_ctrl_r_all_modes_safe" = 1
set -a shell_plugins external_ctrl_r_raw_keypress
end

function warp_bootstrapped
set -l histfile_directory
set histfile_directory "$XDG_DATA_HOME"
Expand Down Expand Up @@ -546,7 +673,8 @@ function warp_bootstrapped
# part of its builtins (e.g. "for", "while", etc.).
set -l escaped_editor (warp_escape_json "$EDITOR")
set -l escaped_shell_path (warp_escape_json (status fish-path))
set -l escaped_json "{\"hook\": \"Bootstrapped\", \"value\": {\"histfile\": \"$escaped_histfile\", \"session_id\": $WARP_SESSION_ID, \"shell\": \"fish\", \"home_dir\": \"$HOME\", \"path\": \"$PATH\", \"editor\": \"$escaped_editor\", \"abbreviations\": \"$escaped_abbr\", \"aliases\": \"$escaped_aliases\", \"function_names\": \"$function_names\", \"env_var_names\": \"$env_var_names\", \"builtins\": \"$escaped_builtins\", \"keywords\": \"\", \"shell_version\": \"$FISH_VERSION\", \"vi_mode_enabled\": \"$vi_mode_enabled\", \"os_category\": \"$os_category\", \"linux_distribution\": \"$linux_distribution\", \"wsl_name\": \"$WSL_DISTRO_NAME\", \"shell_path\": \"$escaped_shell_path\"}}"
set -l escaped_shell_plugins (warp_escape_json $shell_plugins)
set -l escaped_json "{\"hook\": \"Bootstrapped\", \"value\": {\"histfile\": \"$escaped_histfile\", \"session_id\": $WARP_SESSION_ID, \"shell\": \"fish\", \"home_dir\": \"$HOME\", \"path\": \"$PATH\", \"editor\": \"$escaped_editor\", \"abbreviations\": \"$escaped_abbr\", \"aliases\": \"$escaped_aliases\", \"function_names\": \"$function_names\", \"env_var_names\": \"$env_var_names\", \"builtins\": \"$escaped_builtins\", \"keywords\": \"\", \"shell_version\": \"$FISH_VERSION\", \"shell_plugins\": \"$escaped_shell_plugins\", \"vi_mode_enabled\": \"$vi_mode_enabled\", \"os_category\": \"$os_category\", \"linux_distribution\": \"$linux_distribution\", \"wsl_name\": \"$WSL_DISTRO_NAME\", \"shell_path\": \"$escaped_shell_path\"}}"
warp_send_json_message $escaped_json
end

Expand Down
Loading