blob: 4d541274dd6b8901a24d9b957d3b0c02f7ca4aac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#compdef nkf
typeset -A opt_args
local outputsshort="-j -s -e -w -w8 -w16 -w16b0 -w16b -w16l0 -w16l"
local outputs="$outputsshort --fj --unix --mac --windows --jis --euc --sjis --utf8 --utf16"
local inputs=${outputsshort:u}
_arguments -s \
'(-u)-b[Output is buffered]' \
'(-b)-u[Output is unbuffered]' \
'($outputs)'{-j,--jis}'[Output is JIS 7 bit]' \
'($outputs)'{-e,--sjis}'[Output is Shift JIS]' \
'($outputs)'{-s,--euc}'[Output is EUC-JP]' \
'($outputs)'{-w,--utf8}'[Output is UTF-8 (No BOM)]' \
'($outputs)-w8[Output is UTF-8 (BOM)]' \
'($outputs)'{-w16,-w16b0,--utf16}'[Output is UTF-16 (BigEndian; No BOM)]' \
'($outputs)-w16b[Output is UTF-16 (BigEndian; BOM)]' \
'($outputs)-w16l0[Output is UTF-16 (Little Endian; No BOM)]' \
'($outputs)-w16l[Output is UTF-16 (Little Endian; BOM)]' \
'($outputs)--fj[Output is for fj]' \
'($outputs)--unix[Output is for unix]' \
'($outputs)--mac[Output is for Mac]' \
'($outputs)--windows[Output is for Windows]' \
'($inputs)-J[Input assumption is JIS 7 bit]' \
'($inputs)-E[Input assumption is Shift JIS]' \
'($inputs)-S[Input assumption is EUC-JP]' \
'($inputs)-W[Input assumption is UTF-8 (No BOM)]' \
'($inputs)-W8[Input assumption is UTF-8 (BOM)]' \
'($inputs)-W16[Input assumption is UTF-16 (BigEndian; No BOM)]' \
'($inputs)-W16b[Input assumption is UTF-16 (BigEndian; BOM)]' \
'($inputs)-W16l0[Input assumption is UTF-16 (Little Endian; No BOM)]' \
'($inputs)-W16l[Input assumption is UTF-16 (Little Endian; BOM)]' \
'(-M)-m-[MIME decode]:mime decode:((B\:base64 Q\:quoted S\:strict N\:non-strict 0\:no-decode))' \
'(-m)-M-[MIME encode]:mime encode:((\:header B\:base64 Q\:quoted))' \
'-h-[hirakana<->katakana]:hirakata:((1\:hirakana-\>katakana 2\:katakana-\>hirakana 3\:both))' \
'-L-[line mode]:line mode:((u\:LF w\:CRLF m\:CR))' \
'-I[Convert non ISO-2022-JP charactor to GETA]' \
'(--cap-input --url-input)'{--cap-input,--url-input}'[Convert hex after \: or \%]' \
'--overwrite[Overwrite original listed files by filtered result]' \
'(-v --help)'{-v,--help}'[display help message]' \
'*:file:_files' && return 0
return 1
|