From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7984 invoked by alias); 27 Jun 2010 22:06:50 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15128 Received: (qmail 11957 invoked from network); 27 Jun 2010 22:06:39 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at seiken.de designates 94.23.38.107 as permitted sender) From: Joke de Buhr To: zsh-users@zsh.org Subject: Exit value of command glob qualifier within for loop Date: Sun, 27 Jun 2010 23:48:46 +0200 User-Agent: KMail/1.13.2 (Linux/2.6.32-22-generic; KDE/4.4.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1487541.4sdhF9XUID"; protocol="application/pgp-signature"; micalg=pgp-ripemd160 Content-Transfer-Encoding: 7bit Message-Id: <201006272348.48484.joke@seiken.de> --nextPart1487541.4sdhF9XUID Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I'm using a for loop with glob qualifiers to process a list of altered file= s. It=20 looks like this: for a in *(e:age today:); do some_command $a ; done The problem, I've enabled the option PRINT_EXIT_VALUE. Now zsh echoes the l= ine=20 "zsh: exit 1" for every file which doesn't match the qualifier. If I use this (builtin) command zsh reports the exit status as well: print *(e:age today:) But if I use this (external) command zsh doesn't: ls *(e:age today:) I'm not sure if this behavior is intentional but it sure is annoying.=20 Disabling PRINT_EXIT_VALUE before running these commands doesn't make that= =20 much fun. I think zsh shouldn't print the exit value at all. --nextPart1487541.4sdhF9XUID Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQG7BAABAwAlBQJMJ8c+Hhhoa3A6Ly9wb29sLnNrcy1rZXlzZXJ2ZXJzLm5ldAAK CRCWUloJhwFWxmrlC/wKE/rTQIjgWJTzrJT48hZDLrw0IVWwodpdOJx+dIp/n7IO vpd+1D15YSc9XVNab4I/xgg/MXcRj2+tB7HRK+W5J4hfvkFb7AGojat2AB5w9vjm dWLrYnACrKQX8gAvVDrygksLHo2+Y/cTbXcvqVw2THVdlG70uBUQl4jsCeCgrmSg rjlpKe+f+pvMQZn6EHZHfZDYOkQdqixlRGtmJxvpT2xeqICwkJmKsohVaABXnbZX ZOyLEW391ShTK/0Xtaq3hq2HZdUzI3Ggikmnn6uOd12dtg/t68TkNCgjABcnS73Q ENzBHhIk/K1+PXFn0UNdOOeP+BUpzTn/QwGmLio7+4XXZbhLzyiJtS8Ri7cPREIH /k1dRxXlbtsz1bEZ/KGbTQ/priKqHAvxfJSuhpBSvEULKBdeYgx/FBensQ3m1aPf o5X/y4w4vXlGGDlDrsNoIm20dTNjfC5Yn8fW6AyAumXvsFqFluMzXtbRPhuN0V7Q Nj14ZVPFeUcBb5U2xqo= =5UKJ -----END PGP SIGNATURE----- --nextPart1487541.4sdhF9XUID--