1 Date: Mon, 7 Apr 2003 02:01:59 +0000 (UTC)
2 From: Miciah Dashiel Butler Masters <gcgs-gnu-screen@m.gmane.org>
3 Subject: Re: HOWTO: emulate vim's :help in a screen window
5 In article <20030406193514.4b43c6ba.mramos@adinet.com.uy>, Marcelo Ramos wrote:
6 > Something interesting and useful developed with Miciah's help a few minutes
7 > ago in the #screen channel (irc.debian.org):
9 > 1) Create a shell script "showman":
11 > echo -n "What manpage?"; read X; man $X; screen -X eval 'focus bottom' remove
13 > 2) Put the following in your.screenrc:
15 > bindkey "^B" eval split "focus bottom" "screen /path/to/showman"
17 > 3) Now press ^B and enjoy :-)
19 > (^B or the key you prefer)
21 You inspired to write a couple of scripts to generalise this process:
23 screen-run-program-in-region:
27 echo -n Press any key to close this region...
28 read throwaway_variable
29 screen -X eval 'focus bottom' remove
31 screen-open-region-with-program:
38 "screen screen-run-program-in-region $*"
40 Note that enabling zombie-mode will interfere with this script's
41 operation -- to kill the zombie window, screen-run-program-in-region
42 would need to also send Screen the 'kill' command. Unfortunately, if you
43 _disable_ zombie-mode then the 'kill' command would probably kill a
44 program that you _don't_ want killed. This is why we need a per-window
45 zombie-setting (*nudge* *nudge*). A way to silence the kill command
48 BTW, I know that 'echo -n' is not portable. Please forgive me. You can
49 feel free to remove the '-n'.
51 -- Miciah <miciah@myrealbox.com>