From: "Thomas Köhler" <jean-luc@picard.franken.de>
To: zsh-users@sunsite.dk
Subject: $jobstates (Re: zsh: Strange feature with 'jobs' commmand)
Date: Thu, 30 May 2002 14:33:10 +0200 [thread overview]
Message-ID: <20020530123310.GA5771@picard.franken.de> (raw)
In-Reply-To: <20020530135450.A16761@licia.dtek.chalmers.se>
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
Hi,
Björn Johannesson wrote [020530 14:12]:
> Hi.
>
> If you start a few jobs in the background and do:
> zsh% jobs
> [1] - running xmixer
> [2] + running gtcd
> zsh% _
>
> ok, this is expected but this is not...
> zsh% jobs | less
> (END)
> zsh% _
>
> Why? This is quite annoying. You do not get any output if you pipe the
> results from the "jobs" command. (jobs 2>&1|less doesn't work either)
I don't remember exactly why this is the case (you might find
something in the archives), but you can get the information via
the $jobstates associative array.
echo $jobstates | less
What I don't understand from "man zshparam":
k If used in a subscript on an associative array,
this flag causes the keys to be interpreted as pat
terns, and returns the value for the first key
found where exp is matched by the key. This flag
does not work on the left side of an assignment to
an associative array element. If used on another
type of parameter, this behaves like `r'.
K On an associative array this is like `k' but
returns all values where exp is matched by the
keys. On other types of parameters this has the
same effect as `R'.
Why doesn't
~> echo $jobstates[(K)*]
return anything when
~> echo $jobstates[*]
running::6179=running running:-:6193=running running:+:6207=running
returns a few jobs?
~> echo $jobstates[1]
running::6179=running
also works fine. I would suppose
~> echo $jobstates[(K)*]
1 2 3
or something similar...
Ciao,
Thomas
--
Thomas Köhler Email: jean-luc@picard.franken.de | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2002-05-30 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-30 11:54 zsh: Strange feature with 'jobs' commmand Björn Johannesson
2002-05-30 12:16 ` Oliver Kiddle
2002-05-30 12:37 ` Borsenkow Andrej
2002-05-30 15:36 ` Phil Pennock
2002-05-30 12:33 ` Thomas Köhler [this message]
2002-05-30 12:48 ` $jobstates (Re: zsh: Strange feature with 'jobs' commmand) Sven Wischnowsky
2002-05-30 13:25 ` Thomas Köhler
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=20020530123310.GA5771@picard.franken.de \
--to=jean-luc@picard.franken.de \
--cc=zsh-users@sunsite.dk \
/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).