Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to add two empty lines before and after output (stdout) of any command?
- X-seq: zsh-users 11794
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: How to add two empty lines before and after output (stdout) of any command?
- Date: Thu, 23 Aug 2007 15:59:02 +0100
- In-reply-to: <070823074718.ZM14084@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <91f598150708222016n4e8db3a1p194b171819cdd91c@xxxxxxxxxxxxxx> <070823074718.ZM14084@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer wrote:
> On Aug 23, 9:16am, Y@R wrote:
> }
> } Is it possible to solve this problem?
>
> The short answer to this is "no."
>
> The long answer is that in general the shell doesn't have any idea what
> (or if any) output a given command produces. For external commands,
> the shell completely surrenders control of the terminal and waits for
> the command to finish; it can't tell what happens to the display in
> the interim.
Hmm... now you've spelled out the problem, it reminds me that there are
ways of prodding certain sorts of terminal including xterm into
reporting the cursor position. If you do this before and after, you can
guess what's happened, although there are numerous cases (e.g. right at
the bottom of the screen) where this isn't good enough. Then you have
to start looking at what characters are on the screen. I suspect this
isn't going anywhere.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author