aboutsummaryrefslogtreecommitdiff
path: root/bin/wintext
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2021-02-18 20:21:24 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2021-02-18 20:21:24 +0100
commit181d56ee64da53279bb6ecf49c24ab54cfb7193f (patch)
treefc6c8736bb97790a257c5514998c583ffce7c41c /bin/wintext
parent94c521bf102a74aec7e1a5c3a9ef5eaa968d4e14 (diff)
parent90971376a5e8620fc62579aa1b3be26245ec8c06 (diff)
downloadplan9port-master.tar.gz
plan9port-master.tar.bz2
plan9port-master.zip
Merge remote-tracking branch 'upstream/master'HEADmaster
Diffstat (limited to 'bin/wintext')
-rwxr-xr-xbin/wintext23
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