diff options
author | Russ Cox <rsc@swtch.com> | 2020-12-30 07:21:44 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-12-30 07:53:28 -0500 |
commit | 0bd14783426d137428ffae7cd89cfc06b88d1b11 (patch) | |
tree | 590ca684ecfc9861e0f3c9faeac4c3db13dc1b74 | |
parent | 0a7fe606818a7906cdc57ea14cb57b416be6c1de (diff) | |
download | plan9port-0bd14783426d137428ffae7cd89cfc06b88d1b11.tar.gz plan9port-0bd14783426d137428ffae7cd89cfc06b88d1b11.tar.bz2 plan9port-0bd14783426d137428ffae7cd89cfc06b88d1b11.zip |
wintext: use rc not bash
-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 |