On 4/22/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> On 4/22/06, Philip Ganchev <[EMAIL PROTECTED]> wrote:
> > On 4/21/06, ray hammond <[EMAIL PROTECTED]> wrote:
> > [...]
> > > fg %1
> > >
> > > I then received the following:
> > >
> > > Send job 1, 'fg %1' to foreground
> > > fish: Could not send job 1 ('fg %1') to foreground
> > > tcsetpgrp: Operation not permitted
> > >
> > > The prompt then froze and I had to terminate my shell. I attempted the
> > > same
> > > sequence of events in a bash shell. Vi resumed operation without any
> > > problems.
> >
> > There are two separate issues. The error message occurs because Fish
> > currently indexes jobs from 0, and there is no job 1. So you should
> > type "fg" or "fg %0". You can list the jobs using the "jobs" command.
> >
> > I would think that Fish should index jobs from 1 -- to be more
> > consistent with array indexing in Fish and job indexing in POSIX
> > shell, and for the same arguments as indexing arrays from 1.
>
> Never, though about it, but indexing from 1 makes more sense since
> fish indexes arrays from one. If other shells index jobs from 1, then
> there really is _no_ reason not to do the same. Will change, but not
> before 1.21.6, since I want to get that one out the door.
>
> Note though that you can either simply use 'fg' to put the last job to
> be manipulated by job control in the foreground, or e.g. 'fg %vi' to
> put vi into the foreground.
>
> >
> > The second issue is apparently a bug in Fish that prevents sending
> > some terminal programs to the foreground, for example "man" or "vi"
> > but not "xterm", "links", "w3m", "yes" or "tail".
>
> I can put both vi and man into the foreground just fine. Can you give
> me a reproducible test case?
Sorry, that was the behavior with Fish 1,20.1. My apologies.
Fish 1.21.6 seems to freeze only if I try to return to job n when
there is no job n:
fish> jobs
Job Group CPU State Command
0 28475 0% stopped man man
1 28666 0% stopped less hello.txt
fish> fg %2
Send job 2, 'fg %2' to foreground
fish: Could not send job 2 ('fg %2') to foreground
tcsetpgrp: Operation not permitted
[Fish freezes.]
It seems that Fish tries to send the job "fg %2" to the foreground and fails.
On a related note, is there a way to specify a job by name (like
"%man") when the command name is ambiguous (both "man ls" and "man
man" are in the background)? There should be a way to disambiguate
the name, no? Like "fg %'man ls'" or "fg %man ls"?
Also, I'm curious -- why did you decide to make "jobs" print a message
when there are no jobs? I think it should print nothing.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users