* zsh function does dot get back in foreground
@ 2003-07-30 5:50 Pol
2003-07-30 9:33 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Pol @ 2003-07-30 5:50 UTC (permalink / raw)
To: zsh-users
I am using the function
m () {
$PAGER $PAGEROPTS $*
}
to view files.
As i view single files, it is ok, but as i use that fuction to view the
'diff' command out put, e.g.:
% diff file1 file2 |m
i cannot recover the output after the 'm' function has been put in the
beckground.
Entering
% fg
seems to reget 'm' in foreground, but 'diff' out is not displayed on
terminal any more.
The only way out is to kill 'm'.
If 'more' or 'less' is used instead, everything is ok.
What is wrong?
thank you
--
Pol
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh function does dot get back in foreground
2003-07-30 5:50 zsh function does dot get back in foreground Pol
@ 2003-07-30 9:33 ` Peter Stephenson
2003-07-30 9:40 ` Geoff Wing
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2003-07-30 9:33 UTC (permalink / raw)
To: zsh-users
Pol wrote:
> I am using the function
>
> m () {
> $PAGER $PAGEROPTS $*
> }
>
>
> to view files.
> As i view single files, it is ok, but as i use that fuction to view the
> 'diff' command out put, e.g.:
>
> % diff file1 file2 |m
>
> i cannot recover the output after the 'm' function has been put in the
> beckground.
Hmm... putting a function into the background does require some tricky
code inside the shell, but your function seems to work for me on
pipelines on zsh 4.1.1-dev-1. What version are you using? Do you have
any even marginally relevant options set?
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh function does dot get back in foreground
2003-07-30 9:33 ` Peter Stephenson
@ 2003-07-30 9:40 ` Geoff Wing
0 siblings, 0 replies; 3+ messages in thread
From: Geoff Wing @ 2003-07-30 9:40 UTC (permalink / raw)
To: zsh-users
Peter Stephenson <pws@csr.com> typed:
:> i cannot recover the output after the 'm' function has been put in the
:> beckground.
: Hmm... putting a function into the background does require some tricky
: code inside the shell, but your function seems to work for me on
: pipelines on zsh 4.1.1-dev-1. What version are you using? Do you have
: any even marginally relevant options set?
For me, the pager gets a TTIN or TTOU or similar. So fg'ing it puts
a stopped task in the foreground. A simple CONT gets everything going.
Don't know whether that's necessarily appropriate for all backgrounded
tasks put into the foreground.
Regards,
Geoff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-30 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 5:50 zsh function does dot get back in foreground Pol
2003-07-30 9:33 ` Peter Stephenson
2003-07-30 9:40 ` Geoff Wing
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).