lib: show offset and rectype in HexDumpParser
[barry.git] / zsh / _btool
blob093f9c0853455dabc765a7e644f03dfda235dba0
1 #compdef btool
3 local _btool_options
5 local state
8 _btool_options=(
9         '-h[Show the most relevant command line options]' \
10         '-B=[Specify which USB bus to search on]:USB bus:' \
11         '-N=[Specify which system device, using system specific string]:Device:' \
12         '-c=[Convert address book database to LDIF format, using the specified base DN]:LDIF format:' \
13         '-C=[LDIF attribute name to use when building the FQDN]:LDIF attribute:' \
14         '-a=[Clear database FROM device]:Database:' \
15         '-d=[Load database FROM device and dump to screen]:Database:' \
16         '-e=[Override endpoint pair detection]:Endpoint:' \
17         '-i=[International charset for string conversions]:International charset:->iconv' \
18         '-l[List devices]' \
19         '-L[List Contact field names]' \
20         '-m[Map LDIF name to Contact field / Unmap LDIF name]' \
21         '-M[List current LDIF mapping]' \
22         '-n[Use null parser on all databases]' \
23         '-p=[PIN of device to talk with]:PIN:' \
24         '-P=[Simplistic method to specify device password]:Password:' \
25         '-s=[Save database TO device from data loaded from -f file]:Database:' \
26         '-S[Show list of supported database parsers]' \
27         '-t[Show database database table]' \
28         '-T=[Show record state table for given database]:Database:' \
29         '-v[Dump protocol data during operation]' \
30         '-X[Reset device]' \
31         '-z[Use non-threaded sockets]' \
32         '-Z[Use threaded socket router (default)]'
36 _btool_iconv() {
37         local result
39         result=( ${${${(f)"$(_call_program codesets iconv --list)"}## #}%//} )
41         compadd -a "$@" - result
45 _arguments -C -s "$_btool_options[@]" && return 0
48 case $state in
49         iconv)
50                 _btool_iconv && return 0
51         ;;
52 esac