[Pkg-zsh-devel] Bug#1122569: zsh: With RC_EXPAND_PARAM, s:string: does not elide an empty field
Vincent Lefevre
vincent at vinc17.net
Thu Dec 11 12:22:17 GMT 2025
Package: zsh
Version: 5.9-8
Severity: normal
Tags: upstream
Forwarded: https://www.zsh.org/mla/workers/2025/msg00816.html
The zshexpn(1) man page says:
s:string:
[...]
For historical reasons, the usual behaviour that empty array
elements are retained inside double quotes is disabled for
arrays generated by splitting; hence the following:
line="one::three"
print -l "${(s.:.)line}"
produces two lines of output for one and three and elides the
empty field. To override this behaviour, supply the `(@)'
flag as well, i.e. "${(@s.:.)line}".
But without the (@) flag, if the RC_EXPAND_PARAM option is set,
this does not elide the empty field:
cventin% line="one::three" ; print -l "${(s.:.)line}"
one
three
cventin% setopt RC_EXPAND_PARAM
cventin% line="one::three" ; print -l "${(s.:.)line}"
one
three
cventin%
-- Package-specific info:
Packages which provide vendor completions:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-===============-============-=======================================================================
ii bubblewrap 0.11.0-2 amd64 utility for unprivileged chroot and namespace manipulation
ii curl 8.17.0-3 amd64 command line tool for transferring data with URL syntax
ii dkms 3.2.2-1 all Dynamic Kernel Module System (DKMS)
ii dpkg-dev 1.22.21 all Debian package development tools
ii git-buildpackage 0.9.39 all Suite to help with Debian packages in Git repositories
ii mercurial-common 7.1.1-1 all easy-to-use, scalable distributed version control system (common files)
ii meson 1.10.0-1 all high-productivity build system
ii ninja-build 1.13.2-1 amd64 small build system closest in spirit to Make
ii pass 1.7.4-8 all lightweight directory-based password manager
ii pulseaudio-utils 17.0+dfsg1-2+b1 amd64 Command line tools for the PulseAudio sound server
ii qpdf 12.2.0-1 amd64 tools for transforming and inspecting PDF files
ii sqv 1.3.0-4 amd64 OpenPGP signature verification program from Sequoia
ii systemd 258.1-2 amd64 system and service manager
ii udev 258.1-2 amd64 /dev/ and hotplug management daemon
ii zathura 0.5.14-3 amd64 document viewer with a minimalistic interface
dpkg-query: no path found matching pattern /usr/share/zsh/vendor-functions/
-- System Information:
Debian Release: forky/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.17.11+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages zsh depends on:
ii debianutils 5.23.2
ii libc6 2.42-5
ii libcap2 1:2.75-10+b2
ii libtinfo6 6.5+20251123-1
ii zsh-common 5.9-8
Versions of packages zsh recommends:
ii libgdbm6t64 1.26-1
ii libncursesw6 6.5+20251123-1
ii libpcre2-8-0 10.46-1
Versions of packages zsh suggests:
ii zsh-doc 5.9-8
-- no debconf information
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
More information about the Pkg-zsh-devel
mailing list