revert(shell): move iris integration to the iris branch

Reverts 43dfe48, 0692ae3, e0cdcd6 and the cable-description half of
098da70 (the star-prompt stats stay). master returns to the pre-iris
shell setup: atuin in fish/zsh/bash, the down -> pj binding with
PJ_QUIET, and the fish/zsh key bindings as they were. The iris work
lives on the `iris` branch.
This commit is contained in:
Prad Nukala committed 2026-10-05 10:41:51 -04:00
1 parent 098da702fc
commit 2049f580f0
27 files changed
+237 -408

No files matched your search

+52 -14
View File
@@ -33,6 +33,11 @@ fish_add_path $HOME/.grok/bin
# Generated for envman. Do not edit.
test -s ~/.config/envman/load.fish; and source ~/.config/envman/load.fish
if status is-interactive
atuin init fish | source
atuin ai init fish | source
end
# cmux
fish_add_path "/home/prad/.cmux/bin"
fish_add_path "/home/prad/.cache/.bun/bin"
@@ -41,20 +46,53 @@ for _f in $HOME/.config/herdr/plugins/github/herdr-automatic-rename-*/shell/hook
test -r "$_f"; and source "$_f"; and break
end
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)"
# iris (~/.config/iris/config.toml). The init's first half `exec`s iris from an
# interactive fish, which then starts this config again inside its pty; the
# second half installs the cwd/command hooks there. Skipped where iris is not
# installed. `IRIS_RESCUE=1 fish` opens a plain fish (e.g. if iris breaks).
if command -q iris
# fish's `query-term` feature asks the terminal for its capabilities and,
# in kitty, turns on the kitty keyboard protocol (keys as CSI-u escapes).
# iris reads raw key bytes and cannot parse those, so its menu never
# opened in kitty. Feature flags are read at startup, so export the opt-out
# before `exec iris`: the fish iris starts inherits it.
if status is-interactive; and not set -q IRIS_PID; and not set -q IRIS_RESCUE
set -gx fish_features no-query-term
# Question mark at start of line - natural language mode
function _atuin_ai_question_mark
set -l buf (commandline -b)
# If buffer is empty or just contains '?', trigger natural language mode
if test -z "$buf" -o "$buf" = "?"
commandline -r ""
# Close the semantic prompt zone (OSC 133 C) so terminals with
# shell integration don't erase the TUI's output during their
# resize-time prompt reflow.
printf '\033]133;C\007' > /dev/tty
# Run atuin ai inline, swapping stdout and stderr
set -l output (atuin ai inline --hook 3>&1 1>&2 2>&3 | string collect)
if string match --quiet '__atuin_ai_print__:*' "$output"
echo (string replace "__atuin_ai_print__:" "" -- "$output" | string collect)
commandline -f repaint
else if test "$output" = "__atuin_ai_cancel__"
commandline -f repaint
else if string match --quiet '__atuin_ai_execute__:*' "$output"
# Execute the command immediately
set -l cmd (string replace "__atuin_ai_execute__:" "" -- "$output" | string collect)
commandline -r "$cmd"
commandline -f repaint
commandline -f execute
else if string match --quiet '__atuin_ai_insert__:*' "$output"
# Insert the command for editing
set -l cmd (string replace "__atuin_ai_insert__:" "" -- "$output" | string collect)
commandline -r "$cmd"
commandline -f repaint
else if test -n "$output"
# Default: insert for editing
commandline -r "$output"
commandline -f repaint
else
commandline -f repaint
end
else if not contains -- "$fish_key_bindings" fish_vi_key_bindings fish_hybrid_key_bindings
# Not at empty prompt, just insert the question mark
commandline -i "?"
end
iris init fish | source
end
# Set up keybindings
bind "?" _atuin_ai_question_mark
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)"