From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1392 invoked by alias); 28 Nov 2010 03:27:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28464 Received: (qmail 1284 invoked from network); 28 Nov 2010 03:26:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=Ip484tNU1NxffIuDeBTQ3NUMfhm0AaqrU7vk5zQ1bJU=; b=H7u9AntN/z6o3feyXD+Kqb+RKVUmu1+7/N7MK/BDGfY8IrHj76zZASilR1IVBW7V9E XFE0GRxy4Tu+v5bLWDrbfHREZR/uslG2LwEncK9eyiEovm70UIJU0EF9eRaL8+vzPmFD ev8UiB2wElkrb9YCOSza1zdihhM2GmiYxg69I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=NjwStc0WYHgJ40m83H1GtdEBadnQWeExdz21RzcE9Zo24Xrbjubnozo1xcaxksdBBm hn2KiJijtEN5QUFYBJ7wWwuYCpTiDvavwXd83pG0NfoIM3NWBq76KHeWegwTHII7zCfW f3X09IracNf/17isPkDXqroYhNDW1wD7l6ldw= From: ZyX Reply-To: zyx.vim@gmail.com To: zsh-workers@zsh.org Subject: Re: `jobs' builtin does not work with pipe in scripts Date: Sun, 28 Nov 2010 06:26:49 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.34-zen1; KDE/4.4.5; x86_64; ; ) References: <201011252341.44512@-zyx> <201011262116.15270@-zyx> <101127173718.ZM1906@torch.brasslantern.com> In-Reply-To: <101127173718.ZM1906@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1412262.Xcl49Ssbsh"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201011280626.50683@-zyx> --nextPart1412262.Xcl49Ssbsh Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reply to message =C2=ABRe: `jobs' builtin does not work with pipe in script= s=C2=BB,=20 sent 04:37:18 28 November 2010, Sunday by Bart Schaefer: > Hmm, previously you reported yours as "zsh-4.3.10-r2" but I can't find > evidence that this was ever an official zsh version number. There were > a bunch of changes to the handling of MONITOR in July 2009, which is a > bit after 4.3.10 was released. That's also around the time that the > POSIX_JOBS option was added, and is the last time job control was being > changed in any noticeable way. =2Dr2 in gentoo means that maintainer(s) had two times done something that= =20 requires package update, but have not changed mainstream version they are u= sing.=20 So zsh-4.3.10-r2 is zsh-4.3.10 with two ebuild updates. More information ca= n be=20 found here: http://devmanual.gentoo.org/general-concepts/ebuild-revisions/.= =20 Quote: > Ebuilds may have a Gentoo revision number associated with them. This is a= -rX > suffix, where X is an integer =E2=80=94 see File Naming Rules. This compo= nent must > only be used for Gentoo changes, not upstream releases. By default, -r0 is > implied.=20 > > Ebuilds should have their -rX incremented whenever a change is made which= will > make a substantial difference to what gets installed by the package =E2= =80=94 by > substantial, we generally mean "something for which many users would want= to > upgrade". This is usually for bugfixes. > > Simple compile fixes do not warrant a revision bump; this is because they= do > not affect the installed package for users who already managed to compile= it. > Small documentation fixes are also usually not grounds for a new revision. > However, depending on what you want to do with the output, there are > two other ways to go about this. One is to use the $jobstates hash > from the zsh/parameter module, which maps job numbers to strings that > describe the state. Another is to use "jobs -p >>(...)" to keep the > jobs command in the foreground shell and manipulate its output in a > subshell. An third is to direct output from jobs into a file, then > read the file. Thanks, jobstates works just fine. --nextPart1412262.Xcl49Ssbsh Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAkzxy/oACgkQkOgHluiXxU9HVACgkmp4liY+sexlzbFu9OC9p5oL i1EAni0zxg6NUqEaMADpMMYe8s3ZsFPe =H0Fp -----END PGP SIGNATURE----- --nextPart1412262.Xcl49Ssbsh--