Hello, I'm trying to do what the subject says but I have some troubles. Maybe someone already have a solution. Here's what I tried:
#!/bin/sh tty=$(mktemp) st -e sh -c "tty >\"$tty\"; exec \"$SHELL\"" sleep 1 printf 'mytext' >"$(cat "$tty")" rm -- "$tty" I get the text, but the shell (zsh here) doesn't "detect" it (I can't go back, delete it or get completion). Any idea?