Subject: When local state_descr is needed?
From: Marko Myllynen <[email-masked]>
To: zsh workers <[email-masked]>
Date: Thu, 9 Jun 2016 12:57:19 +0300
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hi,

It's a bit unclear to me when local state_descr should be declared.
Reading the man page makes me think that it certainly doesn't hurt to
do it especially when using the ->string convention but is it in fact
needed then to avoid any potential or concrete side-effect?

For example, does the patch below matter in practice at all or not?
In the file later on there is:

  "(-f --from-code $exargs)"{-f+,--from-code=}'[specify code set of input file]:code set:->from_codeset'
  "(-t --to-code $exargs)"{-t+,--to-code=}'[specify code set for output]:code set:->to_codeset'

---
 Completion/Unix/Command/_iconv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_iconv b/Completion/Unix/Command/_iconv
index d040be7..fd74e6b 100644
--- a/Completion/Unix/Command/_iconv
+++ b/Completion/Unix/Command/_iconv
@@ -1,6 +1,6 @@
 #compdef iconv
 
-local expl curcontext="$curcontext" state line variant ret=1
+local expl curcontext="$curcontext" state state_descr line variant ret=1
 
 if _pick_variant -r variant libiconv='GNU*libiconv' glibc='(GNU*libc|EGLIBC|Gentoo)' unix --version; then
   local -a args

Thanks,

-- 
Marko Myllynen