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

19 lines
329 B
Bash

#!/usr/bin/env zsh
local hook=${widgets[zle-line-pre-redraw]-}
if [[ $hook == user:* ]]; then
hook=${hook#user:}
else
hook=
fi
{
if [[ -n $hook ]]; then
builtin zle -D zle-line-pre-redraw
fi
builtin zle -- -z4h-comp-insert-all
} always {
if [[ -n $hook ]]; then
zle -N -- zle-line-pre-redraw "$hook"
fi
}