zsh-users
 help / color / mirror / code / Atom feed
From: "Zefram" <zefram@tao.co.uk>
To: pumilia@est.it
Cc: zsh-users@math.gatech.edu
Subject: Re: A job signaller
Date: Thu, 29 Oct 1998 13:58:23 +0000 (GMT)	[thread overview]
Message-ID: <199810291358.NAA23600@diamond.tao.co.uk> (raw)
In-Reply-To: <19981029143654.A4064@wigner.cstc.org> from "Paolo Pumilia" at Oct 29, 98 02:36:54 pm

Paolo Pumilia wrote:
>Is there a way to put a mark within the prompt string to
>inform the user that jobs are still running from that shell?
>(e.g +/-: "+" for running or stopped jobs; "-" for no jobs)

I use something like this:

precmd () {
  if jobs % >& /dev/null; then
    psvar=("")
  else
    psvar=()
  fi
}
PS1="%(1v:+:-)> "

-zefram


  reply	other threads:[~1998-10-29 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-29 13:36 Paolo Pumilia
1998-10-29 13:58 ` Zefram [this message]
1998-10-29 18:19   ` Dan Nelson
1998-10-29 14:16 ` Alain Caron

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=199810291358.NAA23600@diamond.tao.co.uk \
    --to=zefram@tao.co.uk \
    --cc=pumilia@est.it \
    --cc=zsh-users@math.gatech.edu \
    /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).