Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!mimir!wacsvax!chris From: chris@wacsvax.OZ (chris mcdonald) Newsgroups: comp.unix.wizards Subject: Re: Pager in the shell Message-ID: <720@wacsvax.OZ> Date: Mon, 26-Oct-87 22:33:48 EST Article-I.D.: wacsvax.720 Posted: Mon Oct 26 22:33:48 1987 Date-Received: Sat, 31-Oct-87 14:31:02 EST References: <9779@brl-adm.ARPA> <504@tut.cis.ohio-state.edu> <590@ihdev.ATT.COM> Reply-To: chris@wacsvax.uwa.oz.OZ (chris mcdonald) Organization: Comp Sci, University of Western Australia Lines: 27 > In article <590@ihdev.ATT.COM> pdg@ihdev.UUCP (Joe Isuzu) writes: > > >Re: the discussion of putting a pager in the shell. This is not the > >correct place. The pager belongs in the terminal, and failing that, in > >a streams module. I think many of you are taking the wrong attitude to this request. The title suggests that the pager should be placed in the shell, but the original article just asked if the author could avoid typing '... | pg' all the time. Yes, a pager does not belong in a shell, yes it may belong in the terminal, but neither of these nagative criticisms are helping. A reasonable solution is to introduce an extra environment variable into a shell, eg PAGER. Then if PAGER is defined, to say 'pg' or 'less' and if stdout (and possibly stderr) of each command in the foreground is not redirected, the *the shell* can arrange these file descriptors to go to $PAGER (or perhaps issue 'stty -page' if installed). I have not added this to any shell, but I can see it as a reasonable addition. -------------------------------------------------------------------------------- Chris McDonald. Department of Computer Science, CSNet: chris@wacsvax.oz University of Western Australia, ARPA: chris%wacsvax.oz@uunet.uu.net Mounts Bay Road, UUCP: ..!uunet!munnari!wacsvax!chris Crawley, Western Australia, 6009. PHONE: (09) 380 2305 OVERSEAS: +61 9 380 2305