Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

When local state_descr is needed?



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



Messages sorted by: Reverse Date, Date, Thread, Author