* Bug in compdef()
@ 2007-11-01 10:41 Frank Benkstein
0 siblings, 0 replies; only message in thread
From: Frank Benkstein @ 2007-11-01 10:41 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
Hi,
there seems to be a bug in compdef that prevents more than three
commands from using the same completion service. The problem can be
illustrated by the following commands:
$ compdef foo=mount
$ compdef bar=mount
$ compdef baz=mount
compdef: unknown command or service: mount
The cause of this error is an invalid use of the 'R' array subscript
flag. The following patch fixes the issue.
Best regards
Frank Benkstein.
diff -ur zsh-4.3.4/Completion/compinit zsh-4.3.4.fixed/Completion/compinit
--- zsh-4.3.4/Completion/compinit 2006-11-01 13:25:22.000000000 +0100
+++ zsh-4.3.4.fixed/Completion/compinit 2007-11-01 11:22:16.739402608 +0100
@@ -271,7 +271,7 @@
if [[ "$1" = *\=* ]]; then
cmd="${1%%\=*}"
svc="${1#*\=}"
- func="$_comps[${_services[(R)$svc]:-$svc}]"
+ func="$_comps[${_services[(r)$svc]:-$svc}]"
[[ -n ${_services[$svc]} ]] &&
svc=${_services[$svc]}
[[ -z "$func" ]] &&
--
GPG (Mail): 7093 7A43 CC40 463A 5564 599B 88F6 D625 BE63 866F
GPG (XMPP): 2243 DBBA F234 7C5A 6D71 3983 9F28 4D03 7110 6D51
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-01 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-01 10:41 Bug in compdef() Frank Benkstein
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).