From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Alexey Solovyov <alekso@math.ucr.edu>,
gwing@primenet.com.au (Geoff Wing),
zsh-users@math.gatech.edu
Subject: Re: Contrl-Z action.
Date: Wed, 6 Nov 1996 00:48:58 -0800 [thread overview]
Message-ID: <961106004858.ZM7917@candle.brasslantern.com> (raw)
In-Reply-To: Alexey Solovyov <alekso@math.ucr.edu> "Re: Contrl-Z action." (Nov 5, 8:49pm)
On Nov 5, 8:49pm, Alexey Solovyov wrote:
} Subject: Re: Contrl-Z action.
}
} > :But I've got a question. Once I came up why I want to have my job
} > :suspended by pressing Cntrl-Z ? Ok, I want it to run in background
} > :right after that.
} >
} > I can't think of a elegant way of doing this automatically without a
} > lot of overhead.
}
} Thanks, I will probably do it this way though actually I was thinking
} about changing the sources... :)
Eww, don't do that.
} But anyway suggestions about eliminating the second Ctrl-Z are welcome.
function autobg() {
jobs -s >| /tmp/j$$
while read jnum jdesc
do
bg %${${jnum#\[}%\]}
done < /tmp/j$$
rm -f /tmp/j$$
}
function precmd() {
autobg
}
I really question whether this is the behavior you want, though. You
might want to change the `bg ...' command in autobg to something like
case $jdesc in
(*( vi | vim | *emacs )*) ;; # Don't autobg any editors,
(*) bg %${${jnum#\[}%\]} ;; # but anything else is OK.
esac
or possibly something even more restrictive where you list the things
that you *do* want to autobg rather than those that you don't.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
prev parent reply other threads:[~1996-11-06 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-05 10:46 Alexey Solovyov
1996-11-06 1:39 ` Kosh
1996-11-06 2:58 ` Geoff Wing
1996-11-06 4:49 ` Alexey Solovyov
1996-11-06 8:48 ` Bart Schaefer [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=961106004858.ZM7917@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=alekso@math.ucr.edu \
--cc=gwing@primenet.com.au \
--cc=schaefer@nbn.com \
--cc=zsh-users@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).