plan9port/bin/wintext
2020-12-30 07:53:28 -05:00

17 lines
250 B
Bash
Executable file

#!/usr/local/plan9/bin/rc
if(~ $winid [0-9]*) {
9p read acme/$winid/body
exit 0
}
if(~ $text9term 'unix!'*) {
dial -e $text9term < /dev/null
exit 0
}
if(~ $TMUX ?*) {
tmux capture-pane -p
exit 0
}
echo 'no running window found' >[2=1]
exit 1