cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Feature Request: Support automatic restart via watchexec or cargo watch

Open thurn opened this issue 4 years ago • 1 comments

For interactive development, it would be really nice if I could automatically restart my Cursive application using watchexec to detect filesystem changes. Unfortunately, this doesn't seem to work -- running a command like

watchexec -r "cargo run --example mines"

runs, but produces no terminal output. FWIW, this approach does seem to work for the tui-rs library examples, not sure if this is just down to differences in how the two libraries are structured.

thurn avatar Apr 13 '20 15:04 thurn

Thanks for the report!

I suspect the problem may be with the way watchexec, stdin and /dev/tty interact. We try to use /dev/tty instead of stdin/stdout as much as possible as it allows piping into tui programs, but it means any "parent" process might need to set up a tty appropriately. Will investigate.

gyscos avatar Apr 14 '20 18:04 gyscos