foxshell/fn/z4h-exit
2025-07-04 11:48:40 -05:00

11 lines
235 B
Bash

#!/usr/bin/env zsh
local code=$?
builtin eval "$_z4h_opt"
builtin zle || builtin exit code
typeset -g precmd_functions=(z4h-exit)
if [[ $BUFFER == [[:space:]]# ]]; then
builtin zle -w accept-line
else
builtin zle -w send-break
fi