From: Kevin Sullivan <kevins@drkstr.lkg.dec.com>
To: zsh-users@math.gatech.edu
Cc: zsh-workers@math.gatech.edu
Subject: Re: background jobs / feature request
Date: Fri, 20 Mar 1998 08:12:43 -0500 [thread overview]
Message-ID: <9803201312.AA06169@drkstr> (raw)
In-Reply-To: <Pine.NXT.3.96.980318142519.11767B-100000@luomat>
Timothy Luoma writes:
>
> Say I have several background jobs which I can see with jobs -l which are
> either running in & mode or were control-Z'd into submission
>
> [1] 11381 running tail -1f /tmp/console.log
> [2] - 11839 suspended ls --ignore=.dir.tiff --ignore=.opendir.tiff
> --ignore=.dir3_0.wmd --classify |
> 11840 suspended less
> [3] + 11841 suspended find / -xdev -newer /etc/sendmail.cw -print
> [4] 11767 suspended /usr/local/bin/pine -p
> /Users/luomat/Unix/pine/pine.rc -sort arrival -f activ
>
>
>
> Now I want to get #2 back... is there any way that ZSH could be made to
> understand
>
> fg \[2\]
>
> or, better
>
> fg 11839
>
> ?
>
> This would be much more convenient, especially in the case of pine where I
> have to type
>
> fg /usr/local/bin/pine
>
I use this.
compctl -j -P '%' + -s '`ps x | tail +2 | cut -c1-5`' + \
-x 's[-] p[1]' -k "($signals[1,-3])" -- kill disown fg
which allows me to tab through current jobs. I got the basis for this
from someone, cann't remember who. It was originally designed for
'kill' only but I extended it for 'disown' and 'fg'. The nice thing
about this particular aproach is I don't have to perform an extra
command and muddy up my display.
Kevin Sullivan
prev parent reply other threads:[~1998-03-20 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-18 19:31 Timothy Luoma
1998-03-18 19:49 ` Andrew Main
1998-03-20 13:12 ` Kevin Sullivan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9803201312.AA06169@drkstr \
--to=kevins@drkstr.lkg.dec.com \
--cc=zsh-users@math.gatech.edu \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).