Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compinit #compdef parsing oddity
- X-seq: zsh-workers 38632
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: compinit #compdef parsing oddity
- Date: Tue, 7 Jun 2016 13:26:13 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:to:subject:mime-version; bh=OLZZPVRTSYlK1KCJpFt+BntoYhiGi5fbpiQJ/2Ju2+Q=; b=2BLmffsIfHfUFK1+0zkwtk1oMxQDwIpPkutaTw7VjmKBmenr8kZuRCLCsSYKBbcmLI v6fCiTsy48smnClKVR+QByMpXhKVOd4QxThuQ+B8D66lIVdIKF+GYmSMqTGVbg4vIq/b oPQGgmwu1AN85tvyj2YJZEw2bTbafVajsUEBmmJieJ1BoezEpIvB1pSMbLIExgNq/MFG Xq65xgH8NRa2YHhpoNbXk5Jdt+wI4ge8wH7F4xRBtNMhuTVctJ5QSpbr/5Yc2xocsPsp nnQJhKAx+mjd5j3HEQEb2S4CFNyH2DpYGe+r3I3iFZqnwwluKeFSP2aWdUboVN0aBQqy Hs3A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
If there's a trailing space on the #compdef line in a completion file,
compinit assigns that function as the value of an empty-string key in
the $_comps array. This is because "read -A" preserves a trailing
emtpy field following a $IFS character.
Turns out there's only one such file in the standard set of completion
functions, so I'm not sure whether it's worth fixing compinit.
diff --git a/Completion/Linux/Command/_pkgtool b/Completion/Linux/Command/_pkgtool
index 916e9e3..cb14099 100644
--- a/Completion/Linux/Command/_pkgtool
+++ b/Completion/Linux/Command/_pkgtool
@@ -1,4 +1,4 @@
-#compdef installpkg upgradepkg removepkg pkgtool explodepkg makepkg
+#compdef installpkg upgradepkg removepkg pkgtool explodepkg makepkg
local expl
Messages sorted by:
Reverse Date,
Date,
Thread,
Author