fix: better suggestion and overlay movement on key presses (#12)

- support history suggestions for aliases
https://github.com/versenilvis/IRIS/commit/0ae25d05ce0faf8ff2eeee9aa3fbb5889d9ad511
- merge spec and history results
(https://github.com/versenilvis/IRIS/commit/315c94f12bb689ad6b39b1f0ce5e0bdef71f38d5)
- add 25ms pty throttle and optimize ctrl+l
(https://github.com/versenilvis/IRIS/commit/1e603d74c208be00f6b2cb79a628416455711c3a)
- align suggestion menu to col 1
(https://github.com/versenilvis/IRIS/commit/e307b210849af65276e93e1cff8895f3b54937ff)
- resolve zsh ipc fd mismatch and generate autocomplete hooks
(https://github.com/versenilvis/IRIS/pull/12/commits/2199607fad8122ec441ff4b99e562ca62bd948ff)
- fix: eliminate prompt duplication and freeze UI movement during menu
navigation
https://github.com/versenilvis/IRIS/pull/12/commits/6783989a49f0a68d01bad542588983a5c7b597a2
This commit is contained in:
VERSE
2026-07-01 16:11:38 +07:00
committed by GitHub
parent 69eee40248
commit aca3d1670c
8 changed files with 619 additions and 231 deletions
+34 -3
View File
@@ -21,7 +21,7 @@ For example, add this to your ~/.zshrc:
Run: func(cmd *cobra.Command, args []string) {
shell := args[0]
switch shell {
case "bash", "zsh":
case "zsh":
fmt.Printf(`
# Iris Autostart Hook
if [ -n "$TMUX" ] && [ -n "$IRIS_PID" ]; then
@@ -31,10 +31,41 @@ if [ -n "$TMUX" ] && [ -n "$IRIS_PID" ]; then
fi
if [ -z "$IRIS_PID" ]; then
export IRIS_ACTIVE_SHELL="%s"
export IRIS_ACTIVE_SHELL="zsh"
exec iris
fi
`, shell)
# Iris Autocomplete Hook
if [ -n "$IRIS_PID" ] && [ -n "$IRIS_FD" ]; then
_iris_send_lbuffer() {
print -u $IRIS_FD -N -r -- "$LBUFFER" 2>/dev/null
}
_iris_precmd() {
print -u $IRIS_FD -N -r -- "IRIS_CMD_STOP" 2>/dev/null
}
autoload -Uz add-zle-hook-widget
autoload -Uz add-zsh-hook
add-zle-hook-widget line-pre-redraw _iris_send_lbuffer
add-zsh-hook precmd _iris_precmd
fi
`)
case "bash":
fmt.Printf(`
# Iris Autostart Hook
if [ -n "$TMUX" ] && [ -n "$IRIS_PID" ]; then
if ps -o comm= -p $PPID 2>/dev/null | grep -q "tmux"; then
unset IRIS_PID IRIS_IS_CHILD IRIS_FD
fi
fi
if [ -z "$IRIS_PID" ]; then
export IRIS_ACTIVE_SHELL="bash"
exec iris
fi
`)
case "fish":
fmt.Printf(`
# Iris Autostart Hook