diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/quote1 | 11 | ||||
-rwxr-xr-x | bin/quote2 | 2 | ||||
-rwxr-xr-x | bin/wintext | 8 |
3 files changed, 9 insertions, 12 deletions
@@ -2,19 +2,10 @@ . 9.rc -fn text { - if(~ $winid [0-9]*) - 9p read acme/$winid/body - if not if(~ $text9term unix!*) - dial -e $text9term </dev/null - if not - status='' -} - PROMPT='[^ ]*[%;$#][ ]+' fn cmds { - text | sed -n 's/^'$PROMPT'([^"])/ \1/p' + wintext | sed -n 's/^'$PROMPT'([^"])/ \1/p' } switch($#*) { @@ -1,6 +1,6 @@ #!/usr/local/plan9/bin/rc -cmd = `{" $* | tail -1} +cmd = `{quote1 $* | tail -1} if (~ $#cmd 0) { echo no such command found >[1=2] exit notfound diff --git a/bin/wintext b/bin/wintext index 93fe40ea..80a89957 100755 --- a/bin/wintext +++ b/bin/wintext @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash case "$winid" in [0-9]*) @@ -12,5 +12,11 @@ unix!*) exit 0 esac +case "$TMUX" in +?*) + tmux capture-pane -p + exit 0 +esac + echo 'no running window found' 2>&1 exit 1 |