From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5993 invoked by alias); 4 Mar 2015 17:15:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34643 Received: (qmail 24424 invoked from network); 4 Mar 2015 17:15:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: From: "Jun T." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [PATCH] Doc: escape sequences recognized by print and bindkey Message-Id: Date: Thu, 5 Mar 2015 01:35:03 +0900 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-Biglobe-Spnum: 57802 The following patch tries to clarify which escape sequences are recognized by the print and bindkey builtins. diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index d5e3cf2..dd5a80f 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1094,10 +1094,13 @@ item( [ tt(-R) [ tt(-en) ]] [ var(arg) ... ])( With the `tt(-f)' option the arguments are printed as described by = tt(printf). With no flags or with the flag `tt(-)', the arguments are printed on the standard output as described by tt(echo), with the following = differences: -the escape sequence `tt(\M-)var(x)' metafies the character +the escape sequence `tt(\M-)var(x)' (or `tt(\M)var(x)') metafies the = character var(x) (sets the highest bit), -`tt(\C-)var(x)' produces a control character (`tt(\C-@)' and `tt(\C-?)' = give the -characters NUL and delete), and `tt(\E)' is a synonym for `tt(\e)'. +`tt(\C-)var(x)' (or `tt(\C)var(x)') produces a control character +(`tt(\C-@)' and `tt(\C-?)' give the characters NULL and delete), +a character code in octal is represented by `tt(\)var(NNN)' +(instead of `tt(\0)var(NNN)'), +and `tt(\E)' is a synonym for `tt(\e)'. Finally, if not in an escape sequence, `tt(\)' escapes the following character and is not printed. =20 diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index dd8e628..ab56e35 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -312,6 +312,8 @@ sitem(tt(\t))(horizontal tab) sitem(tt(\v))(vertical tab) sitem(tt(\)var(NNN))(character code in octal) sitem(tt(\x)var(NN))(character code in hexadecimal) +sitem(tt(\u)var(NNNN))(unicode character code in hexadecimal) +sitem(tt(\U)var(NNNNNNNN))(unicode character code in hexadecimal) sitem(tt(\M)[tt(-)]var(X))(character with meta bit set) sitem(tt(\C)[tt(-)]var(X))(control character) sitem(tt(^)var(X))(control character)