diff options
Diffstat (limited to 'bin/wintext')
-rwxr-xr-x | bin/wintext | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/bin/wintext b/bin/wintext index 80a89957..1f36a05c 100755 --- a/bin/wintext +++ b/bin/wintext @@ -1,22 +1,17 @@ -#!/bin/bash +#!/usr/local/plan9/bin/rc -case "$winid" in -[0-9]*) +if(~ $winid [0-9]*) { 9p read acme/$winid/body exit 0 -esac - -case "$text9term" in -unix!*) - dial -e $text9term </dev/null +} +if(~ $text9term 'unix!'*) { + dial -e $text9term < /dev/null exit 0 -esac - -case "$TMUX" in -?*) +} +if(~ $TMUX ?*) { tmux capture-pane -p exit 0 -esac +} -echo 'no running window found' 2>&1 +echo 'no running window found' >[2=1] exit 1 |