Fixe the timeout issue with BlackBerry Storm
[barry/progweb.git] / zsh / _btool
blob13f715e1d1a246b4d607c7d498037011d2aa2a3c
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         '-d=[Load database FROM device and dump to screen]:Database:' \
15         '-e=[Override endpoint pair detection]:Endpoint:' \
16         '-i=[International charset for string conversions]:International charset:->iconv' \
17         '-l[List devices]' \
18         '-L[List Contact field names]' \
19         '-m[Map LDIF name to Contact field / Unmap LDIF name]' \
20         '-M[List current LDIF mapping]' \
21         '-n[Use null parser on all databases]' \
22         '-p=[PIN of device to talk with]:PIN:' \
23         '-P=[Simplistic method to specify device password]:Password:' \
24         '-s=[Save database TO device from data loaded from -f file]:Database:' \
25         '-S[Show list of supported database parsers]' \
26         '-t[Show database database table]' \
27         '-T=[Show record state table for given database]:Database:' \
28         '-v[Dump protocol data during operation]' \
29         '-X[Reset device]' \
30         '-z[Use non-threaded sockets]' \
31         '-Z[Use threaded socket router (default)]'
35 _btool_iconv() {
36         local result
38         result=( ${${${(f)"$(_call_program codesets iconv --list)"}## #}%//} )
40         compadd -a "$@" - result
44 _arguments -C -s "$_btool_options[@]" && return 0
47 case $state in
48         iconv)
49                 _btool_iconv && return 0
50         ;;
51 esac