Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: clear-screen widget and prompt expansion
- X-seq: zsh-workers 37879
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: clear-screen widget and prompt expansion
- Date: Thu, 4 Feb 2016 07:37:31 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=4TE54uLqD7WoiyubQpFdHzNXupZtST+rffyU2n+jBA4=; b=TcHL0mMCYNcoTeUv5bxoNdKKnhlWFCmStSuZcodOS6+vmpUkFqfJME9gogjXr9dzyz 24QpaO/YQVmGyYEFnBZF+QxcANGggno1mTsfYgeCeNReWQc1Zaot9O8zU6GI+fd+7PvQ NKLG9V/yx0SCXdr8dtOafYT4HThDh4Hz/ABfprXVASOM531Q+pkF8NX5Je70Td2L1ejb Zskpa+KEEVB3vqOs9/uraVywoOGigzV9OaXyN+DBnTQdSGzeLK+bGZN6y3oqSL2lQzZe cKLyVfgeot44Rnx8ocflXxeO3UGRLM6vv0h7nTvGw0grNX34782ws9vusz+1RzsMjFxF pAjA==
- In-reply-to: <20160204141206.GA9349@cventin.lip.ens-lyon.fr>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160204141206.GA9349@cventin.lip.ens-lyon.fr>
On Feb 4, 3:12pm, Vincent Lefevre wrote:
}
} Shouldn't the prompt also be re-expanded (like when the screen is
} resized)? Or is it up to the user to create a new widget for that?
There was a deliberate decision made a long time ago that once ZLE
is started, the prompt is a relatively static part of the editor.
Originally this was because prompts are formatted by the shell (even
if ZLE is disabled) and ZLE was treated like a separate entity.
Window resize is particularly tricky because, depending on the window
manager/desktop application, SIGWINCH may be sent either only once
when the user releases the mouse button (or otherwise ends the drag-
resize operation), or multiple times in very rapid succession for every
incremental drag motion.
So it's left up to the user to decide how to handle that, typically by
something like
TRAPWINCH() { zle && zle reset-prompt }
Messages sorted by:
Reverse Date,
Date,
Thread,
Author