Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

3.1.<7->: zsh/parameter and jobs

This is my first message on this list, so please allow me to introduce
myself.  I'm a computer science teacher in Melbourne, and I've been
using zsh since about version 2.4.  I've only recently upgraded to zsh
3, so there's a lot of nice juicy features that I'm still pretty new at.
It took me a couple of weeks to get my head around the new completion
system. :)

Anyway, what I wanted to ask was this:  In 3.1.7, or maybe slightly
earlier, the zsh/parameter module introduced the special associative
arrays: jobdirs, jobtexts, jobstates.  These ostensibly were introduced
to help with automatic completion, but I developed another use for them.
I'd developed a zsh prompt format over the years to suit my needs, and
part of it was to print a list of suspended jobs in the prompt, to
remind me the jobs were there.  It used to do it by running
  jobs -s > /tmp/joblist
and then parsing the contents of joblist (with awk and then perl - I
suppose it could have been done with judicious use of reads and
parameter substitution).  Anyway, that's academic now, since it's now
just a matter of examining the magical jobstates and jobtexts

Unfortunately, one of the things that I now miss from doing it the new
way is that zsh cannot tell me which jobs are the current and previous
job.  My old get-the-output-of-the-jobs-builtin could do that.  All it
would take to get the new system doing it is a read-only export of the
curjob and prevjob variables in the shell's source code.  (I
briefly looked at the zsh source code for making modules, and quickly
decided that I wasn't up to the task.)

Any thoughts about this?

Debbie Pickett http://www.csse.monash.edu.au/~debbiep debbiep@xxxxxxxxxxxxxxxxxx
"I made the break to freedom, now I'm following the dream. You're never going to
  get here if you hold the old routine." - _Blown by the Wind_, Alan Parsons

Messages sorted by: Reverse Date, Date, Thread, Author