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

[PATCH] update _iconv (support Citrus version in macOS etc)



macOS was using iconv from GNU libiconv, but in Sonoma it uses
iconv from the Citrus Project. This iconv does not support
the option --version, but can list the available codesets by
the option -l. Current _iconv supports this iconv only in
FreeBSD. It seems DragonFly and NetBSD also use this iconv.


diff --git a/Completion/Unix/Command/_iconv b/Completion/Unix/Command/_iconv
index bf04acfe4..fba0b9afe 100644
--- a/Completion/Unix/Command/_iconv
+++ b/Completion/Unix/Command/_iconv
@@ -63,7 +63,7 @@ else
     '1:file:_files' && return 0
 
   if [[ $state = codeset ]]; then
-    if [[ $OSTYPE = freebsd* ]]; then
+    if [[ $OSTYPE = (freebsd|dragonfly|netbsd|darwin)* ]]; then
       codeset=( $(_call_program codesets $words[1] -l) )
     elif [[ -f /usr/lib/iconv/iconv_data ]]; then  # IRIX & Solaris
       codeset=( ${${(f)"$(</usr/lib/iconv/iconv_data)"}%%[[:blank:]]*} )






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