test-case: vim works inside aish (interactive PTY) #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps
cd ~/src/aish && luajit main.lua$vim /tmp/aish-pty-test.txt(the$prefix force-routes to shell)i(just the letter, no Enter) to enter insert mode.Hello from vimfollowed by Esc.:wqthen Enter.$cat /tmp/aish-pty-test.txtExpected
ienters insert mode without needing Enter (= raw mode is active).:wqwrites the file and quits.─── exit 0 ───.catprintsHello from vim.What this exercises
Phase 1 §1 done-criteria #2 (PTY-backed exec works for interactive cmds).
Specifically:
forkpty, stdin→master forwarding, parent tty raw mode toggle, child line discipline.Likely failure modes
i,:wq) doesn't take effect → raw-mode toggle broken.restore_termiosmissed.[aish:fast]> $cat /tmp/aish-pty-test.txt
─── exec output ───
Hello from vim
─── exit 0 ───
[aish:fast]>
executed succesfully.