zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: get the number of active jobs to show in the prompt?
Date: Wed, 03 Oct 2001 02:06:37 +0200	[thread overview]
Message-ID: <4ac3633923vincent@vinc17.org> (raw)
In-Reply-To: <200110022325.JAA07306@bruce.csse.monash.edu.au>

In article <200110022325.JAA07306@bruce.csse.monash.edu.au>,
   Deborah Ariel Pickett <debbiep@mail.csse.monash.edu.au> wrote:

> What you seem to want is for zsh to instantly be interrupted and have it
> re-process the prompt.

> How?

The current command should be saved in a safe place. Then, the necessary
functions (e.g., precmd()) should be called. Finally, the current command
should be restored and displayed with the new prompt(s).

> Should it run precmd() again to do so?  What if there's stuff in
> precmd() that isn't to do with generating the prompt, but is instead
> involved in dealing with command history?

This is not a problem. When the user is typing a command (even if
multiline), the command isn't in the history yet.

> You wouldn't want that to run again, because you haven't finished typing
> your command.

Why not?

Or perhaps there should be two different functions: precmd(), which
should behave like now, and preprompt(), which should be run just
before the prompt is (re)displayed. Then, the code that modifies the
prompt should be in preprompt().

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


  parent reply	other threads:[~2001-10-03  0:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-01  5:56 Drew Perttula
2001-10-01  6:09 ` Goran Koruga
2001-10-01  6:12 ` Sweth Chandramouli
2001-10-01  6:37   ` Phil Pennock
2001-10-01  6:59     ` Drew Perttula
2001-10-01  7:08     ` Sweth Chandramouli
2001-10-01  8:28 ` Deborah Ariel Pickett
2001-10-01  9:04   ` Phil Pennock
2001-10-01 17:44     ` Vincent Lefevre
2001-10-02 15:43       ` Bart Schaefer
2001-10-02 16:13         ` Vincent Lefevre
2001-10-02 23:25           ` Deborah Ariel Pickett
2001-10-02 23:29             ` unsubscribe me Matthew Lyon
2001-10-03  0:06             ` Vincent Lefevre [this message]
2001-10-03  5:43               ` get the number of active jobs to show in the prompt? Bart Schaefer
2001-10-03 14:22                 ` Vincent Lefevre
2001-10-03 14:59                   ` Vincent Lefevre
2001-10-03 15:11                   ` Bart Schaefer
2001-10-03 15:35                     ` Vincent Lefevre
2001-10-03 15:58                       ` Bart Schaefer
2001-10-03 16:47                         ` Vincent Lefevre
2001-10-03 17:09                           ` Bart Schaefer
2001-10-03 19:34                             ` Vincent Lefevre
2001-10-03 20:01                               ` Bart Schaefer
2001-10-03 20:08                                 ` Vincent Lefevre
2001-10-03 21:46                                   ` Bart Schaefer
2001-10-03 21:51                                     ` Bart Schaefer
2001-10-03 23:15                                       ` Vincent Lefevre
2001-10-04  0:05                                         ` Bart Schaefer

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=4ac3633923vincent@vinc17.org \
    --to=vincent@vinc17.org \
    --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).