gloo 0.3.0 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.rubocop.yml +73 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +86 -83
- data/Rakefile +7 -6
- data/bin/console +4 -4
- data/gloo.gemspec +22 -18
- data/lib/gloo.rb +6 -6
- data/lib/gloo/app/args.rb +30 -31
- data/lib/gloo/app/engine.rb +80 -30
- data/lib/gloo/app/help.rb +17 -11
- data/lib/gloo/app/info.rb +3 -3
- data/lib/gloo/app/log.rb +17 -17
- data/lib/gloo/app/mode.rb +4 -4
- data/lib/gloo/app/settings.rb +51 -41
- data/lib/gloo/convert/string_to_datetime.rb +21 -0
- data/lib/gloo/convert/string_to_decimal.rb +20 -0
- data/lib/gloo/convert/string_to_integer.rb +20 -0
- data/lib/gloo/core/baseo.rb +7 -7
- data/lib/gloo/core/dictionary.rb +30 -27
- data/lib/gloo/core/error.rb +50 -0
- data/lib/gloo/core/event_manager.rb +17 -23
- data/lib/gloo/core/factory.rb +149 -39
- data/lib/gloo/core/gloo_system.rb +121 -54
- data/lib/gloo/core/heap.rb +15 -13
- data/lib/gloo/core/it.rb +5 -5
- data/lib/gloo/core/literal.rb +7 -7
- data/lib/gloo/core/obj.rb +138 -79
- data/lib/gloo/core/obj_finder.rb +9 -14
- data/lib/gloo/core/op.rb +8 -8
- data/lib/gloo/core/parser.rb +27 -26
- data/lib/gloo/core/pn.rb +68 -52
- data/lib/gloo/core/script.rb +7 -7
- data/lib/gloo/core/tokens.rb +39 -41
- data/lib/gloo/core/verb.rb +30 -19
- data/lib/gloo/exec/dispatch.rb +30 -0
- data/lib/gloo/exec/runner.rb +43 -0
- data/lib/gloo/expr/expression.rb +36 -43
- data/lib/gloo/expr/l_boolean.rb +7 -6
- data/lib/gloo/expr/l_decimal.rb +34 -0
- data/lib/gloo/expr/l_integer.rb +5 -4
- data/lib/gloo/expr/l_string.rb +13 -15
- data/lib/gloo/expr/op_div.rb +5 -5
- data/lib/gloo/expr/op_minus.rb +5 -5
- data/lib/gloo/expr/op_mult.rb +5 -5
- data/lib/gloo/expr/op_plus.rb +7 -7
- data/lib/gloo/objs/basic/alias.rb +111 -0
- data/lib/gloo/objs/basic/boolean.rb +63 -38
- data/lib/gloo/objs/basic/container.rb +71 -12
- data/lib/gloo/objs/basic/decimal.rb +96 -0
- data/lib/gloo/objs/basic/integer.rb +45 -16
- data/lib/gloo/objs/basic/script.rb +62 -38
- data/lib/gloo/objs/basic/string.rb +47 -15
- data/lib/gloo/objs/basic/text.rb +69 -21
- data/lib/gloo/objs/basic/untyped.rb +35 -10
- data/lib/gloo/objs/cli/banner.rb +137 -0
- data/lib/gloo/objs/cli/bar.rb +141 -0
- data/lib/gloo/objs/cli/colorize.rb +54 -24
- data/lib/gloo/objs/cli/confirm.rb +63 -29
- data/lib/gloo/objs/cli/menu.rb +236 -0
- data/lib/gloo/objs/cli/menu_item.rb +128 -0
- data/lib/gloo/objs/cli/pastel.rb +120 -0
- data/lib/gloo/objs/cli/prompt.rb +73 -31
- data/lib/gloo/objs/cli/select.rb +153 -0
- data/lib/gloo/objs/ctrl/each.rb +128 -61
- data/lib/gloo/objs/ctrl/repeat.rb +129 -0
- data/lib/gloo/objs/data/markdown.rb +109 -0
- data/lib/gloo/objs/data/table.rb +168 -0
- data/lib/gloo/objs/dev/git.rb +98 -64
- data/lib/gloo/objs/dt/date.rb +72 -0
- data/lib/gloo/objs/dt/datetime.rb +84 -0
- data/lib/gloo/objs/dt/time.rb +72 -0
- data/lib/gloo/objs/ror/erb.rb +82 -41
- data/lib/gloo/objs/ror/eval.rb +73 -31
- data/lib/gloo/objs/snd/play.rb +71 -0
- data/lib/gloo/objs/snd/say.rb +120 -0
- data/lib/gloo/objs/system/file_handle.rb +129 -48
- data/lib/gloo/objs/system/system.rb +84 -38
- data/lib/gloo/objs/web/http_get.rb +103 -46
- data/lib/gloo/objs/web/http_post.rb +70 -44
- data/lib/gloo/objs/web/json.rb +155 -0
- data/lib/gloo/objs/web/slack.rb +89 -58
- data/lib/gloo/objs/web/teams.rb +88 -53
- data/lib/gloo/objs/web/uri.rb +160 -0
- data/lib/gloo/persist/file_loader.rb +95 -85
- data/lib/gloo/persist/file_saver.rb +12 -12
- data/lib/gloo/persist/file_storage.rb +15 -15
- data/lib/gloo/persist/line_splitter.rb +79 -0
- data/lib/gloo/persist/persist_man.rb +63 -39
- data/lib/gloo/utils/words.rb +2 -2
- data/lib/gloo/verbs/alert.rb +67 -16
- data/lib/gloo/verbs/beep.rb +70 -0
- data/lib/gloo/verbs/cls.rb +67 -0
- data/lib/gloo/verbs/context.rb +61 -21
- data/lib/gloo/verbs/create.rb +52 -21
- data/lib/gloo/verbs/help.rb +186 -27
- data/lib/gloo/verbs/if.rb +55 -21
- data/lib/gloo/verbs/list.rb +55 -24
- data/lib/gloo/verbs/load.rb +47 -12
- data/lib/gloo/verbs/move.rb +128 -0
- data/lib/gloo/verbs/put.rb +90 -34
- data/lib/gloo/verbs/quit.rb +43 -12
- data/lib/gloo/verbs/run.rb +63 -18
- data/lib/gloo/verbs/save.rb +45 -10
- data/lib/gloo/verbs/show.rb +56 -22
- data/lib/gloo/verbs/tell.rb +45 -13
- data/lib/gloo/verbs/unless.rb +56 -21
- data/lib/gloo/verbs/version.rb +42 -12
- data/lib/gloo/verbs/wait.rb +73 -0
- data/lib/run.rb +5 -5
- metadata +90 -12
@@ -7,45 +7,46 @@
|
|
7
7
|
module Gloo
|
8
8
|
module Objs
|
9
9
|
class Confirm < Gloo::Core::Obj
|
10
|
-
|
11
|
-
KEYWORD = 'confirm'
|
12
|
-
KEYWORD_SHORT = 'confirm'
|
13
|
-
PROMPT = 'prompt'
|
14
|
-
RESULT = 'result'
|
15
10
|
|
16
|
-
|
11
|
+
KEYWORD = 'confirm'.freeze
|
12
|
+
KEYWORD_SHORT = 'confirm'.freeze
|
13
|
+
PROMPT = 'prompt'.freeze
|
14
|
+
RESULT = 'result'.freeze
|
15
|
+
|
16
|
+
#
|
17
17
|
# The name of the object type.
|
18
|
-
#
|
18
|
+
#
|
19
19
|
def self.typename
|
20
20
|
return KEYWORD
|
21
21
|
end
|
22
22
|
|
23
|
-
#
|
23
|
+
#
|
24
24
|
# The short name of the object type.
|
25
|
-
#
|
25
|
+
#
|
26
26
|
def self.short_typename
|
27
27
|
return KEYWORD_SHORT
|
28
28
|
end
|
29
|
-
|
30
|
-
#
|
29
|
+
|
30
|
+
#
|
31
31
|
# Get the URI from the child object.
|
32
32
|
# Returns nil if there is none.
|
33
|
-
#
|
34
|
-
def
|
33
|
+
#
|
34
|
+
def prompt_value
|
35
35
|
o = find_child PROMPT
|
36
36
|
return nil unless o
|
37
|
+
|
37
38
|
return o.value
|
38
39
|
end
|
39
|
-
|
40
|
-
#
|
40
|
+
|
41
|
+
#
|
41
42
|
# Set the result of the system call.
|
42
|
-
#
|
43
|
-
def set_result data
|
43
|
+
#
|
44
|
+
def set_result( data )
|
44
45
|
r = find_child RESULT
|
45
46
|
return nil unless r
|
47
|
+
|
46
48
|
r.set_value data
|
47
49
|
end
|
48
|
-
|
49
50
|
|
50
51
|
# ---------------------------------------------------------------------
|
51
52
|
# Children
|
@@ -57,36 +58,69 @@ module Gloo
|
|
57
58
|
def add_children_on_create?
|
58
59
|
return true
|
59
60
|
end
|
60
|
-
|
61
|
+
|
61
62
|
# Add children to this object.
|
62
|
-
# This is used by containers to add children needed
|
63
|
+
# This is used by containers to add children needed
|
63
64
|
# for default configurations.
|
64
65
|
def add_default_children
|
65
66
|
fac = $engine.factory
|
66
|
-
fac.create
|
67
|
-
|
67
|
+
fac.create( { :name => 'prompt',
|
68
|
+
:type => 'string',
|
69
|
+
:value => '> ',
|
70
|
+
:parent => self } )
|
71
|
+
fac.create( { :name => 'result',
|
72
|
+
:type => 'boolean',
|
73
|
+
:value => nil,
|
74
|
+
:parent => self } )
|
68
75
|
end
|
69
76
|
|
70
|
-
|
71
77
|
# ---------------------------------------------------------------------
|
72
78
|
# Messages
|
73
79
|
# ---------------------------------------------------------------------
|
74
80
|
|
75
|
-
#
|
81
|
+
#
|
76
82
|
# Get a list of message names that this object receives.
|
77
|
-
#
|
83
|
+
#
|
78
84
|
def self.messages
|
79
|
-
return super + [
|
85
|
+
return super + [ 'run' ]
|
80
86
|
end
|
81
|
-
|
87
|
+
|
82
88
|
# Run the system command.
|
83
89
|
def msg_run
|
84
|
-
prompt =
|
90
|
+
prompt = prompt_value
|
85
91
|
return unless prompt
|
92
|
+
|
86
93
|
result = $prompt.yes?( prompt )
|
87
94
|
set_result result
|
88
95
|
end
|
89
|
-
|
96
|
+
|
97
|
+
# ---------------------------------------------------------------------
|
98
|
+
# Help
|
99
|
+
# ---------------------------------------------------------------------
|
100
|
+
|
101
|
+
#
|
102
|
+
# Get help for this object type.
|
103
|
+
#
|
104
|
+
def self.help
|
105
|
+
return <<~TEXT
|
106
|
+
CONFIRM OBJECT TYPE
|
107
|
+
NAME: confirm
|
108
|
+
SHORTCUT: confirm
|
109
|
+
|
110
|
+
DESCRIPTION
|
111
|
+
CLI confirmation prompt.
|
112
|
+
|
113
|
+
CHILDREN
|
114
|
+
prompt - string - '> '
|
115
|
+
The confirmation prompt.
|
116
|
+
result - boolean - none
|
117
|
+
The result of the prompt.
|
118
|
+
|
119
|
+
MESSAGES
|
120
|
+
run - Prompt the user and then set the result.
|
121
|
+
TEXT
|
122
|
+
end
|
123
|
+
|
90
124
|
end
|
91
125
|
end
|
92
126
|
end
|
@@ -0,0 +1,236 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# A CLI menu.
|
5
|
+
# The menu contains a collection of menu items, a prompt
|
6
|
+
# and an option to loop until done.
|
7
|
+
#
|
8
|
+
|
9
|
+
module Gloo
|
10
|
+
module Objs
|
11
|
+
class Menu < Gloo::Core::Obj
|
12
|
+
|
13
|
+
KEYWORD = 'menu'.freeze
|
14
|
+
KEYWORD_SHORT = 'menu'.freeze
|
15
|
+
PROMPT = 'prompt'.freeze
|
16
|
+
ITEMS = 'items'.freeze
|
17
|
+
LOOP = 'loop'.freeze
|
18
|
+
HIDE_ITEMS = 'hide_items'.freeze
|
19
|
+
BEFORE_MENU = 'before_menu'.freeze
|
20
|
+
DEFAULT = 'default'.freeze
|
21
|
+
|
22
|
+
#
|
23
|
+
# The name of the object type.
|
24
|
+
#
|
25
|
+
def self.typename
|
26
|
+
return KEYWORD
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The short name of the object type.
|
31
|
+
#
|
32
|
+
def self.short_typename
|
33
|
+
return KEYWORD_SHORT
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Get the value of the prompt child object.
|
38
|
+
# Returns nil if there is none.
|
39
|
+
#
|
40
|
+
def prompt_value
|
41
|
+
o = find_child PROMPT
|
42
|
+
return '' unless o
|
43
|
+
|
44
|
+
return o.value
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Get the value of the loop child object.
|
49
|
+
# Should we keep looping or should we stop?
|
50
|
+
#
|
51
|
+
def loop?
|
52
|
+
o = find_child LOOP
|
53
|
+
return false unless o
|
54
|
+
|
55
|
+
return o.value
|
56
|
+
end
|
57
|
+
|
58
|
+
# ---------------------------------------------------------------------
|
59
|
+
# Children
|
60
|
+
# ---------------------------------------------------------------------
|
61
|
+
|
62
|
+
# Does this object have children to add when an object
|
63
|
+
# is created in interactive mode?
|
64
|
+
# This does not apply during obj load, etc.
|
65
|
+
def add_children_on_create?
|
66
|
+
return true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Add children to this object.
|
70
|
+
# This is used by containers to add children needed
|
71
|
+
# for default configurations.
|
72
|
+
def add_default_children
|
73
|
+
fac = $engine.factory
|
74
|
+
fac.create_string PROMPT, '> ', self
|
75
|
+
fac.create_can ITEMS, self
|
76
|
+
fac.create_bool LOOP, true, self
|
77
|
+
fac.create_script DEFAULT, '', self
|
78
|
+
end
|
79
|
+
|
80
|
+
# ---------------------------------------------------------------------
|
81
|
+
# Messages
|
82
|
+
# ---------------------------------------------------------------------
|
83
|
+
|
84
|
+
#
|
85
|
+
# Get a list of message names that this object receives.
|
86
|
+
#
|
87
|
+
def self.messages
|
88
|
+
return super + [ 'run' ]
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Show the menu options, and prompt for user input.
|
93
|
+
#
|
94
|
+
def msg_run
|
95
|
+
loop do
|
96
|
+
begin_menu
|
97
|
+
if prompt_value.empty?
|
98
|
+
dt = DateTime.now
|
99
|
+
d = dt.strftime( '%Y.%m.%d' )
|
100
|
+
t = dt.strftime( '%I:%M:%S' )
|
101
|
+
cmd = $prompt.ask( "#{d.yellow} #{t.white} >" )
|
102
|
+
else
|
103
|
+
cmd = $prompt.ask( prompt_value )
|
104
|
+
end
|
105
|
+
cmd ? run_command( cmd ) : run_default
|
106
|
+
break unless loop?
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# ---------------------------------------------------------------------
|
111
|
+
# Menu actions
|
112
|
+
# ---------------------------------------------------------------------
|
113
|
+
|
114
|
+
#
|
115
|
+
# Begin the menu execution.
|
116
|
+
# Run the before menu script if there is one,
|
117
|
+
# then show options unless we are hiding them by default.
|
118
|
+
#
|
119
|
+
def begin_menu
|
120
|
+
run_before_menu
|
121
|
+
|
122
|
+
# Check to see if we should show items at all.
|
123
|
+
o = find_child HIDE_ITEMS
|
124
|
+
return if o && o.value == true
|
125
|
+
|
126
|
+
show_options
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
# If there is a before menu script, run it now.
|
131
|
+
#
|
132
|
+
def run_before_menu
|
133
|
+
o = find_child BEFORE_MENU
|
134
|
+
return unless o
|
135
|
+
|
136
|
+
Gloo::Exec::Dispatch.message 'run', o
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Show the list of menu options.
|
141
|
+
#
|
142
|
+
def show_options
|
143
|
+
o = find_child ITEMS
|
144
|
+
return unless o
|
145
|
+
|
146
|
+
o.children.each do |mitem|
|
147
|
+
mitem = Gloo::Objs::Alias.resolve_alias( mitem )
|
148
|
+
puts " #{mitem.shortcut_value} - #{mitem.description_value}"
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
# Find the command matching user input.
|
154
|
+
#
|
155
|
+
def find_cmd( cmd )
|
156
|
+
o = find_child ITEMS
|
157
|
+
return nil unless o
|
158
|
+
|
159
|
+
o.children.each do |mitem|
|
160
|
+
mitem = Gloo::Objs::Alias.resolve_alias( mitem )
|
161
|
+
return mitem if mitem.shortcut_value.downcase == cmd.downcase
|
162
|
+
end
|
163
|
+
|
164
|
+
return nil
|
165
|
+
end
|
166
|
+
|
167
|
+
#
|
168
|
+
# Run the default option.
|
169
|
+
#
|
170
|
+
def run_default
|
171
|
+
obj = find_child DEFAULT
|
172
|
+
return unless obj
|
173
|
+
|
174
|
+
s = Gloo::Core::Script.new obj
|
175
|
+
s.run
|
176
|
+
end
|
177
|
+
|
178
|
+
#
|
179
|
+
# Run the selected command.
|
180
|
+
#
|
181
|
+
def run_command( cmd )
|
182
|
+
obj = find_cmd cmd
|
183
|
+
|
184
|
+
unless obj
|
185
|
+
if cmd == '?'
|
186
|
+
show_options
|
187
|
+
else
|
188
|
+
puts "#{cmd} is not a valid option"
|
189
|
+
end
|
190
|
+
return
|
191
|
+
end
|
192
|
+
|
193
|
+
script = obj.do_script
|
194
|
+
return unless script
|
195
|
+
|
196
|
+
s = Gloo::Core::Script.new script
|
197
|
+
s.run
|
198
|
+
end
|
199
|
+
|
200
|
+
# ---------------------------------------------------------------------
|
201
|
+
# Help
|
202
|
+
# ---------------------------------------------------------------------
|
203
|
+
|
204
|
+
#
|
205
|
+
# Get help for this object type.
|
206
|
+
#
|
207
|
+
def self.help
|
208
|
+
return <<~TEXT
|
209
|
+
MENU OBJECT TYPE
|
210
|
+
NAME: menu
|
211
|
+
SHORTCUT: menu
|
212
|
+
|
213
|
+
DESCRIPTION
|
214
|
+
A CLI menu.
|
215
|
+
This can be used for the main loop of a CLI application.
|
216
|
+
|
217
|
+
CHILDREN
|
218
|
+
prompt - string - '> '
|
219
|
+
The shortcut may be used to select the menu item.
|
220
|
+
items - container
|
221
|
+
A textual description of the menu item action.
|
222
|
+
loop - boolean
|
223
|
+
The script that will be run if the menu item is selected.
|
224
|
+
default - script
|
225
|
+
Optional script element. Run this if no other option selected.
|
226
|
+
|
227
|
+
MESSAGES
|
228
|
+
run - Show the options and the the prompt.
|
229
|
+
Then run the script for the user's selection.
|
230
|
+
Optionally repeat as long as the loop child is true.
|
231
|
+
TEXT
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# Author:: Eric Crane (mailto:eric.crane@mac.com)
|
2
|
+
# Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved.
|
3
|
+
#
|
4
|
+
# A CLI menu item. One element in a CLI menu.
|
5
|
+
#
|
6
|
+
|
7
|
+
module Gloo
|
8
|
+
module Objs
|
9
|
+
class MenuItem < Gloo::Core::Obj
|
10
|
+
|
11
|
+
KEYWORD = 'menu_item'.freeze
|
12
|
+
KEYWORD_SHORT = 'mitem'.freeze
|
13
|
+
SHORTCUT = 'shortcut'.freeze
|
14
|
+
DESCRIPTION = 'description'.freeze
|
15
|
+
DO = 'do'.freeze
|
16
|
+
|
17
|
+
#
|
18
|
+
# The name of the object type.
|
19
|
+
#
|
20
|
+
def self.typename
|
21
|
+
return KEYWORD
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# The short name of the object type.
|
26
|
+
#
|
27
|
+
def self.short_typename
|
28
|
+
return KEYWORD_SHORT
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Get the value of the menu item shortcut.
|
33
|
+
# Returns nil if there is none.
|
34
|
+
#
|
35
|
+
def shortcut_value
|
36
|
+
o = find_child SHORTCUT
|
37
|
+
return self.name unless o
|
38
|
+
|
39
|
+
return o.value
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Get the action's description.
|
44
|
+
# Returns nil if there is none.
|
45
|
+
#
|
46
|
+
def description_value
|
47
|
+
o = find_child DESCRIPTION
|
48
|
+
return self.value unless o
|
49
|
+
|
50
|
+
return o.value
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Get the action's script.
|
55
|
+
# Returns nil if there is none.
|
56
|
+
#
|
57
|
+
def do_script
|
58
|
+
return find_child DO
|
59
|
+
end
|
60
|
+
|
61
|
+
# ---------------------------------------------------------------------
|
62
|
+
# Children
|
63
|
+
# ---------------------------------------------------------------------
|
64
|
+
|
65
|
+
# Does this object have children to add when an object
|
66
|
+
# is created in interactive mode?
|
67
|
+
# This does not apply during obj load, etc.
|
68
|
+
def add_children_on_create?
|
69
|
+
return true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Add children to this object.
|
73
|
+
# This is used by containers to add children needed
|
74
|
+
# for default configurations.
|
75
|
+
def add_default_children
|
76
|
+
fac = $engine.factory
|
77
|
+
fac.create_string SHORTCUT, '', self
|
78
|
+
fac.create_string DESCRIPTION, '', self
|
79
|
+
fac.create_script DO, '', self
|
80
|
+
end
|
81
|
+
|
82
|
+
# ---------------------------------------------------------------------
|
83
|
+
# Messages
|
84
|
+
# ---------------------------------------------------------------------
|
85
|
+
|
86
|
+
#
|
87
|
+
# Get a list of message names that this object receives.
|
88
|
+
#
|
89
|
+
def self.messages
|
90
|
+
return super
|
91
|
+
end
|
92
|
+
|
93
|
+
# ---------------------------------------------------------------------
|
94
|
+
# Help
|
95
|
+
# ---------------------------------------------------------------------
|
96
|
+
|
97
|
+
#
|
98
|
+
# Get help for this object type.
|
99
|
+
#
|
100
|
+
def self.help
|
101
|
+
return <<~TEXT
|
102
|
+
MENU_ITEM OBJECT TYPE
|
103
|
+
NAME: menu_item
|
104
|
+
SHORTCUT: mitem
|
105
|
+
|
106
|
+
DESCRIPTION
|
107
|
+
A CLI menu item. One element in a CLI menu.
|
108
|
+
|
109
|
+
CHILDREN
|
110
|
+
shortcut - string
|
111
|
+
The shortcut may be used to select the menu item.
|
112
|
+
The shortcut child is optional. If it is not provided,
|
113
|
+
the name of the menu item will be used instead.
|
114
|
+
description - string
|
115
|
+
A textual description of the menu item action.
|
116
|
+
The description child is optional. If it is not provided,
|
117
|
+
the value of the menu item will be used instead.
|
118
|
+
do - script
|
119
|
+
The script that will be run if the menu item is selected.
|
120
|
+
|
121
|
+
MESSAGES
|
122
|
+
None
|
123
|
+
TEXT
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|