zsh-workers
 help / color / mirror / code / Atom feed
* compinit #compdef parsing oddity
@ 2016-06-07 20:26 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2016-06-07 20:26 UTC (permalink / raw)
  To: zsh-workers

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
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-07 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 20:26 compinit #compdef parsing oddity Bart Schaefer

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).