From 7da98c51246f245cde16cddb9b418afcfb3b3574 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 15 Feb 2008 23:59:05 +0000 Subject: 24556: %G in prompt for glitch characters --- Doc/Zsh/prompt.yo | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Doc/Zsh/prompt.yo') diff --git a/Doc/Zsh/prompt.yo b/Doc/Zsh/prompt.yo index 456a0bc0e..66e2b9015 100644 --- a/Doc/Zsh/prompt.yo +++ b/Doc/Zsh/prompt.yo @@ -188,6 +188,18 @@ Include a string as a literal escape sequence. The string within the braces should not change the cursor position. Brace pairs can nest. ) +item(tt(%G))( +Within a tt(%{)...tt(%}) sequence, include a `glitch': that is, assume +that a single character width will be output. This is useful when +outputting characters that otherwise cannot be correctly handled by the +shell, such as the alternate character set on some terminals. +The characters in question can be included within a tt(%{)...tt(%}) +sequence together with the appropriate number of tt(%G) sequences to +indicate the correct width. An integer between the `tt(%)' and `tt(G)' +indicates a character width other than one. Hence tt(%{)var(seq)tt(%2G%}) +outputs var(seq) and assumes it takes up the width of two standard +characters. +) enditem() sect(Conditional Substrings in Prompts) -- cgit 1.4.1