From: Zefram <zefram@fysh.org>
To: Le Wang <lewang@yahoo.com>
Cc: zsh-users@sunsite.dk
Subject: Re: pipe issues with 'jobs' command
Date: Tue, 30 Oct 2001 04:20:41 +0000 [thread overview]
Message-ID: <20011030042041.B30596@fysh.org> (raw)
In-Reply-To: <20011030041449.97914.qmail@web12303.mail.yahoo.com>
Le Wang wrote:
>getJobCount () {
> print "$#jobtexts";
>}
>
>prompt_le1_precmd () {
> PS1="$(getJobCount) %# "
> PS2="%_> "
> PS3="?# "
>}
>--------------
>
>If I call getJobCount from the shell directly (e.g.
>execute the command 'getJobCount'), I get the real
>number of jobs, but my prompt always prints 0. What's
>going on here?
$() also creates a subshell.
You might find psvar and the %v prompt sequence helpful.
-zefram
prev parent reply other threads:[~2001-10-30 4:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 1:37 Le Wang
2001-10-29 5:21 ` Sweth Chandramouli
2001-10-30 4:14 ` Le Wang
2001-10-30 4:20 ` Zefram [this message]
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=20011030042041.B30596@fysh.org \
--to=zefram@fysh.org \
--cc=lewang@yahoo.com \
--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).