[Pkg-zsh-devel] Bug#654444: zsh: `q' flag for paramater expansion does not work as advertised

Samuel Bronson naesten at gmail.com
Tue Jan 3 19:01:08 UTC 2012


Package: zsh
Version: 4.3.12-1
Severity: normal

The manual says this about the flag:

,----
| q
|      Quote the resulting words with backslashes; unprintable or invalid
|      characters are quoted using the $'\NNN' form, with separate quotes
|      for each octet.  [...]
`----

Unfortunately, the second clause seems to be only half correct;
unprintable characters do get wrapped in $'...', but not \NNN escaped:

,----
| naesten at hydrogen:~/hacking/crawl/crawl-ref/source% echo -n ${(q)$(echo
| -e "\e")}|hd
| 00000000  24 27 1b 27                                       |$'.'|
| 00000004
`----

Of course, what I'd *really* like would be for this to get escaped as
\e, not \NNN, but I was at least expecting the documented behavior!

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages zsh depends on:
ii  libc6                         2.13-10    Embedded GNU C Library: Shared lib
ii  libcap2                       1:2.16-5   support for getting/setting POSIX.
ii  libncursesw5                  5.9-4      shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libc6                         2.13-10    Embedded GNU C Library: Shared lib
ii  libpcre3                      8.12-3     Perl 5 Compatible Regular Expressi

Versions of packages zsh suggests:
ii  zsh-doc                       4.3.10-14  zsh documentation - info/HTML form

-- Configuration Files:
/etc/zsh/zlogin changed:

/etc/zsh/zlogout changed:

/etc/zsh/zprofile changed:


-- debconf information:
* zsh/rcmove:

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!





More information about the Pkg-zsh-devel mailing list