Package: zsh-beta Version: 4.3.9-dev-3+20090425-1 Severity: normal File: /usr/share/zsh-beta/functions/Completion/Base/_values
`xmms2 jump` completion uses
_values -s ' ' 'playlist items' ${(On)playlistitems}
where $playlistitems is an array with items e.g.
1[foo]
2[bar]
...
12[baz]
13[foo]
Unfortunately, it seems as if _values does something weird:
Even though ${(On)...} yields a reverse-numerically sorted list of
those items, the output seems not numerically sorted.
In addition, the way _values merges keys with the same value (1 and
13 in the above) is suboptimal for the use case.
This list:
[0/193] Deep Purple - Highway Star (06:43)
[1/194] Deep Purple - Child in Time (12:17)
[2/195] Deep Purple - Smoke on the Water (07:36)
[3/196] Deep Purple - The Mule (09:28)
[4/197] Deep Purple - Strange Kind of Woman (09:52)
[5/198] Deep Purple - Lazy (10:27)
[6/199] Deep Purple - Space Truckin' (19:54)
[7/200] Deep Purple - Black Night (06:18)
[8/201] Deep Purple - Speed King (07:24)
[9/202] Deep Purple - Lucille (08:03)
[10/203] Deep Purple - Highway Star (06:41)
[11/204] Deep Purple - Black Night (05:48)
[12/205] Deep Purple - A Twist in the Tail (04:23)
[13/206] Deep Purple - Perfect Strangers (06:52)
[14/207] Deep Purple - Anyone's Daugher (03:52)
[15/208] Deep Purple - Child in Time (10:42)
[16/209] Deep Purple - Anya (12:08)
[17/210] Deep Purple - Speed King (07:33)
[18/211] Deep Purple - Smoke on the Water (10:09)
Yields this completion output:
playlist items
10 -- Deep Purple - Highway Star
11 7 -- Deep Purple - Black Night
12 -- Deep Purple - A Twist in the Tail
13 -- Deep Purple - Perfect Strangers
14 -- Deep Purple - Anyone's Daugher
15 1 -- Deep Purple - Child in Time
16 -- Deep Purple - Anya
17 8 -- Deep Purple - Speed King
18 2 -- Deep Purple - Smoke on the Water
3 -- Deep Purple - The Mule
4 -- Deep Purple - Strange Kind of Woman
5 -- Deep Purple - Lazy
6 -- Deep Purple - Space Truckin'
9 -- Deep Purple - Lucille
I am sure you'll agree that that's not really useful. It would be
better to have proper numeric sorting and disable the merging.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-rc4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages zsh-beta depends on:
ii libc6 2.9-9 GNU C Library: Shared libraries
ii libcap2 1:2.16-5 support for getting/setting POSIX.
ii libncursesw5 5.7+20090425-1 shared libraries for terminal hand
ii passwd 1:4.1.3.1-1 change and administer password and
Versions of packages zsh-beta recommends:
ii libc6 2.9-9 GNU C Library: Shared libraries
ii libpcre3 7.8-2 Perl 5 Compatible Regular Expressi
Versions of packages zsh-beta suggests:
pn zsh-beta-doc <none> (no description available)
-- no debconf information
--
.''`. martin f. krafft <[email protected]> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

