Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] update _iconv (support Citrus version in macOS etc)
- X-seq: zsh-workers 52413
- From: "Jun. T" <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] update _iconv (support Citrus version in macOS etc)
- Date: Thu, 14 Dec 2023 00:30:39 +0900
- Archived-at: <https://zsh.org/workers/52413>
- List-id: <zsh-workers.zsh.org>
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