Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: get the number of active jobs to show in the prompt?
- X-seq: zsh-users 4330
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Vincent Lefevre <vincent@xxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: get the number of active jobs to show in the prompt?
- Date: Wed, 3 Oct 2001 17:09:26 +0000
- In-reply-to: <20011003184755.A1397@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20011002181324.A29201@xxxxxxxxxxxxxx> <200110022325.JAA07306@xxxxxxxxxxxxxxxxxxxxxxxx> <4ac3633923vincent@xxxxxxxxxx> <1011003054350.ZM25561@xxxxxxxxxxxxxxxxxxxxxxx> <20011003162246.C32766@xxxxxxxxxxxxxx> <1011003151104.ZM26311@xxxxxxxxxxxxxxxxxxxxxxx> <20011003173500.A1255@xxxxxxxxxxxxxx> <1011003155807.ZM26499@xxxxxxxxxxxxxxxxxxxxxxx> <20011003184755.A1397@xxxxxxxxxxxxxx>
On Oct 3, 6:47pm, Vincent Lefevre wrote:
} Subject: Re: get the number of active jobs to show in the prompt?
}
} > If notify is involved, then the fact that the prompt could change
} > length and that the current "prompt level" could need to change from
} > PS2 or deeper back to PS1, leads to all the objections that have
} > been raised.
}
} In my case, the length isn't changed. So, this is not my problem.
Yes, but to implement a general solution in the ZLE C code, the possibility
that the prompt might change length would have to be dealt with. And even
if the PS1 prompt doesn't change length, the insertion (or not) of the
various PS2 and other prompts could change the screen.
} > # zle .clear-screen # You may or may not want this
}
} I want this, so I uncommented it.
}
} This doesn't work: the screen is cleared, but then, the prompt is
} printed twice.
Right, the old prompt and editor input is redisplayed by clear-screen,
and then the new prompt is generated and displayed below that.
} Replacing "zle .clear-screen" by "clear" almost works.
} The problem is that push-line seems to send a \n.
Again, that's right. ZLE doesn't know that you've erased the screen with
"clear", so it thinks it has to move down past the current editing area
before redrawing the new prompt.
There's no way to force it to draw the new prompt directly on top of the
old one, because of the the length-may-have-changed etc. reasons above.
There's also unfortunately no way to get it to regenerate the prompt first
and then do clear-screen afterwards, because `send-break' aborts even a
user-defined widget in progress.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author