7 local _bjavaloader_commands
8 local _bjavaloader_options
10 local _bjavaloader_erase
11 local _bjavaloader_wipe
14 _bjavaloader_commands=(
15 'cleareventlog:Clears the handheld event log'
16 'deviceinfo:Provides information on the handheld'
17 'dir:Lists modules on the handheld'
18 'erase:Erase module from handheld'
19 'eventlog:Retrieves the handheld event log'
20 'load:Loads modules onto the handheld'
21 'logstacktraces:Dump the stack traces for all threads to the event log'
22 'resettofactory:Reset IT policy to factory defaults'
23 'save:Retrieves modules from the handheld'
24 'screenshot:Make a screenshot of handheld'
25 'settime:Sets the time on the handheld'
26 'wipe:Wipes the handheld'
29 _bjavaloader_options=(
30 '-h[Show the most relevant command line options]'
31 '-p[PIN of device to talk with]:PIN device'
32 '-P[PIN of device to talk with (optional)]:PIN device'
33 '-v[Dump protocol data during operation]'
34 '*::arg:->cmd_or_options'
38 '-s[List sibling in module list]'
42 '-f[Force to erase an application current running]'
46 '-a[Wipe applications only]'
47 '-i[Wipe filesystem only]'
55 _arguments -C -s "$_bjavaloader_options[@]" && return 0
60 if (( CURRENT == 1)); then
61 _describe -t commands 'bjavaloader command' _bjavaloader_commands && ret=0
65 _message 'no more arguments' && ret=0
69 _message 'no more arguments' && ret=0
73 _message 'no more arguments' && ret=0
75 _arguments -C -A '-*' -s \
76 "$_bjavaloader_dir[@]" && ret=0
80 _message 'modules name from the handheld'
82 _arguments -C -A '-*' -s \
83 "$_bjavaloader_erase[@]" \
85 '*:directory:_path_files -/' \
87 '*:COD files:_path_files -g "*.cod(-.)"' && ret=0
91 _message 'no more arguments' && ret=0
95 _arguments -C -A '-*' -s \
97 '*:directory:_path_files -/' \
99 '*:COD files:_path_files -g "*.cod(-.)"' && ret=0
103 _message 'no more arguments' && ret=0
107 _message 'modules name from the handheld' && ret=0
111 _arguments -C -A '-*' -s \
113 '*:directory:_path_files -/' \
115 '*:BMP files:_path_files -g "*.bmp(-.)"' && ret=0
119 _message 'time format [yyyy-mm-dd HH:MM:SS]' && ret=0
123 _message 'no more arguments' && ret=0
125 _arguments -C -A '-*' -s \
126 "$_bjavaloader_wipe[@]" && ret=0