Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
When local state_descr is needed?
- X-seq: zsh-workers 38637
- From: Marko Myllynen <myllynen@xxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: When local state_descr is needed?
- Date: Thu, 9 Jun 2016 12:57:19 +0300
- 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
- Organization: Red Hat
- Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
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