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

Re: list all jobs before prompt



On Jun 12,  3:16pm, Michael Wardle wrote:
> 
> I would like zsh to list /all/ jobs when I suspend one.

I think the closest you can get without a modification of the source code
is this:

precmd () {
  local x=$?	# This must be the first line of precmd!
  # ... do whatever precmd stuff you already do, then ...
  # This requires zmodload zsh/parameter plus extendedglob:
  (( x == 20 )) && jobs %${(k)^jobstates[(R)^*:+:*]}
}

> I could also do a lot of manual filtering in precmd

Not a lot, is it?

> still wouldn't produce the desired,
> consistent output format unless I could also prevent the default message

Oh, well; you can't always get what you want.



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