Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: jobs not listing all commands
- X-seq: zsh-workers 19434
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zw <zsh-workers@xxxxxxxxxx>
- Subject: Re: jobs not listing all commands
- Date: Wed, 18 Feb 2004 06:02:17 +0000
- In-reply-to: <20040218002553.GA1429@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040217075827.1498.qmail@xxxxxxxxxxxxxxxxxxxxxxx> <1040217221439.ZM12330@xxxxxxxxxxxxxxxxxxxxxxx> <20040218002553.GA1429@xxxxxxxxxxxxxxxxxxxxx>
On Feb 18, 8:25am, James Devenish wrote:
} Subject: Re: jobs not listing all commands
}
} > Prompts don't update between two interactive commands, ever, no matter
} > what the reason. The prompt string is computed when ZLE initializes
} > (just before it is first printed) and is thereafter used verbatim until
} > the next re-initialize.
}
} I'm a bit confused by both of the both comments.
What I mean by "between two interactive commands" is "after one command
finishes (and the prompt is printed) but before the next one _begins_
(i.e. when accept-line is executed)."
The empty command is still a command for this purpose.
} Firstly, %j works "as a user would expect" for me in zsh v4.1.1 (i.e.
} I get the behaviour that Felix expects).
I suspect you really don't. Try this:
zsh -f
% PS1='njobs:%j %'
njobs:0 % sleep 60 &
njobs:1 % sleep 10 &
njobs:2 %
Now wait 10 seconds. You should see:
[2] + done sleep 10
njobs:2 %
Note that the prompt has not changed. If you now hit return, it should
change to:
njobs:1 %
} Secondly, %t, %@, %T, %*, %? (etc.) work as expected in PS1
I think you'll find they work the same as %j in the example above.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author