gloo 0.3.0 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
data/lib/gloo/verbs/help.rb
CHANGED
|
@@ -7,63 +7,222 @@
|
|
|
7
7
|
module Gloo
|
|
8
8
|
module Verbs
|
|
9
9
|
class Help < Gloo::Core::Verb
|
|
10
|
-
|
|
11
|
-
KEYWORD = 'help'
|
|
12
|
-
KEYWORD_SHORT = '?'
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
KEYWORD = 'help'.freeze
|
|
12
|
+
KEYWORD_SHORT = '?'.freeze
|
|
13
|
+
|
|
14
|
+
DISPATCH = {
|
|
15
|
+
settings: 'show_settings',
|
|
16
|
+
verb: 'show_verbs',
|
|
17
|
+
verbs: 'show_verbs',
|
|
18
|
+
v: 'show_verbs',
|
|
19
|
+
obj: 'show_objs',
|
|
20
|
+
object: 'show_objs',
|
|
21
|
+
objects: 'show_objs',
|
|
22
|
+
o: 'show_objs'
|
|
23
|
+
}.freeze
|
|
24
|
+
|
|
25
|
+
#
|
|
15
26
|
# Run the verb.
|
|
16
|
-
#
|
|
27
|
+
#
|
|
17
28
|
def run
|
|
18
29
|
opts = @tokens.second if @tokens
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
opts = opts.strip.downcase if opts
|
|
31
|
+
|
|
32
|
+
if opts
|
|
33
|
+
self.dispatch opts
|
|
34
|
+
else
|
|
35
|
+
show_default
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# Dispatch the help to the right place.
|
|
41
|
+
#
|
|
42
|
+
def dispatch( opts )
|
|
43
|
+
cmd = DISPATCH[ opts.to_sym ]
|
|
44
|
+
if cmd
|
|
45
|
+
send cmd
|
|
24
46
|
else
|
|
25
|
-
|
|
47
|
+
entity_help opts
|
|
48
|
+
end
|
|
49
|
+
rescue
|
|
50
|
+
report_help_error opts
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
#
|
|
54
|
+
# Dispatch the help command to a verb or object
|
|
55
|
+
# if we can find one matching the request.
|
|
56
|
+
#
|
|
57
|
+
def entity_help( opts )
|
|
58
|
+
return if try_verb_help opts
|
|
59
|
+
return if try_object_help opts
|
|
60
|
+
|
|
61
|
+
report_help_error opts
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
#
|
|
65
|
+
# See if there is a verb we can show help
|
|
66
|
+
# information about.
|
|
67
|
+
#
|
|
68
|
+
def try_verb_help( opts )
|
|
69
|
+
if $engine.dictionary.verb?( opts )
|
|
70
|
+
t = $engine.dictionary.find_verb( opts )
|
|
71
|
+
out = t.send 'help'
|
|
72
|
+
self.show_output out
|
|
73
|
+
return true
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
return false
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
#
|
|
80
|
+
# See if there is a verb we can show help
|
|
81
|
+
# information about.
|
|
82
|
+
#
|
|
83
|
+
def try_object_help( opts )
|
|
84
|
+
if $engine.dictionary.obj?( opts )
|
|
85
|
+
t = $engine.dictionary.find_obj( opts )
|
|
86
|
+
out = t.send 'help'
|
|
87
|
+
self.show_output out
|
|
88
|
+
return true
|
|
26
89
|
end
|
|
90
|
+
|
|
91
|
+
return false
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
#
|
|
95
|
+
# Lookup the opts in the dispatch table.
|
|
96
|
+
#
|
|
97
|
+
def lookup_opts( opts )
|
|
98
|
+
return DISPATCH[ opts.to_sym ]
|
|
27
99
|
end
|
|
28
|
-
|
|
29
|
-
#
|
|
100
|
+
|
|
101
|
+
#
|
|
102
|
+
# Report an error with the inline help.
|
|
103
|
+
#
|
|
104
|
+
def report_help_error( opts )
|
|
105
|
+
msg = "Help command '#{opts}' could not be found"
|
|
106
|
+
$log.warn msg
|
|
107
|
+
$engine.heap.error.set_to msg
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
#
|
|
111
|
+
# If no parameter is given, show the default help page.
|
|
112
|
+
#
|
|
113
|
+
def show_default
|
|
114
|
+
$engine.run_help( true )
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
#
|
|
118
|
+
# Show application settings.
|
|
119
|
+
#
|
|
120
|
+
def show_settings
|
|
121
|
+
$settings.show
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
#
|
|
30
125
|
# List the verbs
|
|
31
|
-
#
|
|
126
|
+
#
|
|
32
127
|
def show_verbs
|
|
33
|
-
|
|
128
|
+
out = self.get_verb_list
|
|
129
|
+
self.show_output out
|
|
130
|
+
end
|
|
34
131
|
|
|
35
|
-
|
|
132
|
+
#
|
|
133
|
+
# Get the text for the list of verbs.
|
|
134
|
+
#
|
|
135
|
+
def get_verb_list
|
|
136
|
+
out = "Verbs:\n"
|
|
36
137
|
$engine.dictionary.get_verbs.each do |v|
|
|
37
|
-
|
|
138
|
+
out << " #{v.keyword_shortcut} - #{v.keyword}\n"
|
|
38
139
|
end
|
|
140
|
+
return out
|
|
39
141
|
end
|
|
40
142
|
|
|
41
|
-
#
|
|
143
|
+
#
|
|
42
144
|
# List the object types
|
|
43
|
-
#
|
|
145
|
+
#
|
|
44
146
|
def show_objs
|
|
45
|
-
|
|
147
|
+
out = self.get_obj_list
|
|
148
|
+
self.show_output out
|
|
149
|
+
end
|
|
46
150
|
|
|
47
|
-
|
|
151
|
+
#
|
|
152
|
+
# Get the text for the list of verbs.
|
|
153
|
+
#
|
|
154
|
+
def get_obj_list
|
|
155
|
+
out = "Object Types:\n"
|
|
48
156
|
$engine.dictionary.get_obj_types.each do |v|
|
|
49
|
-
|
|
157
|
+
out << " #{v.short_typename} - #{v.typename}\n"
|
|
50
158
|
end
|
|
159
|
+
return out
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
#
|
|
163
|
+
# Write output to it and show it unless we are in
|
|
164
|
+
# silent mode.
|
|
165
|
+
#
|
|
166
|
+
def show_output( out )
|
|
167
|
+
$engine.heap.it.set_to out
|
|
168
|
+
puts out unless $engine.args.quiet?
|
|
51
169
|
end
|
|
52
|
-
|
|
53
|
-
#
|
|
170
|
+
|
|
171
|
+
#
|
|
54
172
|
# Get the Verb's keyword.
|
|
55
|
-
#
|
|
173
|
+
#
|
|
56
174
|
def self.keyword
|
|
57
175
|
return KEYWORD
|
|
58
176
|
end
|
|
59
177
|
|
|
60
|
-
#
|
|
178
|
+
#
|
|
61
179
|
# Get the Verb's keyword shortcut.
|
|
62
|
-
#
|
|
180
|
+
#
|
|
63
181
|
def self.keyword_shortcut
|
|
64
182
|
return KEYWORD_SHORT
|
|
65
183
|
end
|
|
66
184
|
|
|
185
|
+
# ---------------------------------------------------------------------
|
|
186
|
+
# Help
|
|
187
|
+
# ---------------------------------------------------------------------
|
|
188
|
+
|
|
189
|
+
#
|
|
190
|
+
# Get help for this verb.
|
|
191
|
+
#
|
|
192
|
+
def self.help
|
|
193
|
+
return <<~TEXT
|
|
194
|
+
HELP VERB
|
|
195
|
+
NAME: helps
|
|
196
|
+
SHORTCUT: ?
|
|
197
|
+
|
|
198
|
+
DESCRIPTION
|
|
199
|
+
Show information about the application.
|
|
200
|
+
The help command can also be used to show a list of objects,
|
|
201
|
+
verbs, or to show detail about a single object or a
|
|
202
|
+
single verb.
|
|
203
|
+
|
|
204
|
+
SYNTAX
|
|
205
|
+
help <about>
|
|
206
|
+
|
|
207
|
+
PARAMETERS
|
|
208
|
+
about - Optional parameter.
|
|
209
|
+
If no parameter is given, shows the default help screen
|
|
210
|
+
settings - Show application settings
|
|
211
|
+
verbs - List available verbs
|
|
212
|
+
objects - List available objects
|
|
213
|
+
<verb> - Look up detail about a verb
|
|
214
|
+
<object> - Look up detail about an object
|
|
215
|
+
|
|
216
|
+
RESULT
|
|
217
|
+
The help screen will be shown with relevant information.
|
|
218
|
+
<it> will also contain the help text.
|
|
219
|
+
|
|
220
|
+
ERRORS
|
|
221
|
+
Trying to access a help topic that does not exist will result
|
|
222
|
+
in an error.
|
|
223
|
+
TEXT
|
|
224
|
+
end
|
|
225
|
+
|
|
67
226
|
end
|
|
68
227
|
end
|
|
69
228
|
end
|
data/lib/gloo/verbs/if.rb
CHANGED
|
@@ -7,50 +7,84 @@
|
|
|
7
7
|
module Gloo
|
|
8
8
|
module Verbs
|
|
9
9
|
class If < Gloo::Core::Verb
|
|
10
|
-
|
|
11
|
-
KEYWORD = 'if'
|
|
12
|
-
KEYWORD_SHORT = 'if'
|
|
13
|
-
THEN = 'then'
|
|
14
|
-
|
|
15
|
-
#
|
|
10
|
+
|
|
11
|
+
KEYWORD = 'if'.freeze
|
|
12
|
+
KEYWORD_SHORT = 'if'.freeze
|
|
13
|
+
THEN = 'then'.freeze
|
|
14
|
+
|
|
15
|
+
#
|
|
16
16
|
# Run the verb.
|
|
17
|
-
#
|
|
17
|
+
#
|
|
18
18
|
def run
|
|
19
19
|
value = @tokens.before_token( THEN )
|
|
20
20
|
if value.count > 1
|
|
21
21
|
# The first token is the verb, so we drop it.
|
|
22
|
-
value = value[1..-1]
|
|
22
|
+
value = value[ 1..-1 ]
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
evals_true = false
|
|
26
|
-
if value.count
|
|
26
|
+
if value.count.positive?
|
|
27
27
|
expr = Gloo::Expr::Expression.new( value )
|
|
28
28
|
result = expr.evaluate
|
|
29
29
|
evals_true = true if result == true
|
|
30
|
+
evals_true = true if result.is_a?( Numeric ) && result != 0
|
|
30
31
|
end
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
return unless evals_true
|
|
33
|
+
|
|
34
|
+
cmd = @tokens.expr_after( THEN )
|
|
35
|
+
i = $engine.parser.parse_immediate cmd
|
|
36
|
+
return unless i
|
|
37
|
+
|
|
38
|
+
i.run
|
|
38
39
|
end
|
|
39
|
-
|
|
40
|
-
#
|
|
40
|
+
|
|
41
|
+
#
|
|
41
42
|
# Get the Verb's keyword.
|
|
42
|
-
#
|
|
43
|
+
#
|
|
43
44
|
def self.keyword
|
|
44
45
|
return KEYWORD
|
|
45
46
|
end
|
|
46
47
|
|
|
47
|
-
#
|
|
48
|
+
#
|
|
48
49
|
# Get the Verb's keyword shortcut.
|
|
49
|
-
#
|
|
50
|
+
#
|
|
50
51
|
def self.keyword_shortcut
|
|
51
52
|
return KEYWORD_SHORT
|
|
52
53
|
end
|
|
53
54
|
|
|
55
|
+
# ---------------------------------------------------------------------
|
|
56
|
+
# Help
|
|
57
|
+
# ---------------------------------------------------------------------
|
|
58
|
+
|
|
59
|
+
#
|
|
60
|
+
# Get help for this verb.
|
|
61
|
+
#
|
|
62
|
+
def self.help
|
|
63
|
+
return <<~TEXT
|
|
64
|
+
IF VERB
|
|
65
|
+
NAME: if
|
|
66
|
+
SHORTCUT: if
|
|
67
|
+
|
|
68
|
+
DESCRIPTION
|
|
69
|
+
If an expression is true then do something.
|
|
70
|
+
|
|
71
|
+
SYNTAX
|
|
72
|
+
if <true> then <do>
|
|
73
|
+
|
|
74
|
+
PARAMETERS
|
|
75
|
+
true - Does the expression evaluate to true?
|
|
76
|
+
do - Execute command if the expression is true.
|
|
77
|
+
|
|
78
|
+
RESULT
|
|
79
|
+
Unchanged if the expression is not true.
|
|
80
|
+
If true, then the result will be based on the command
|
|
81
|
+
specified after the 'then' keyword.
|
|
82
|
+
|
|
83
|
+
ERRORS
|
|
84
|
+
The errors depend on the object that is run.
|
|
85
|
+
TEXT
|
|
86
|
+
end
|
|
87
|
+
|
|
54
88
|
end
|
|
55
89
|
end
|
|
56
90
|
end
|
data/lib/gloo/verbs/list.rb
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
module Gloo
|
|
8
8
|
module Verbs
|
|
9
9
|
class List < Gloo::Core::Verb
|
|
10
|
-
|
|
11
|
-
KEYWORD = 'list'
|
|
12
|
-
KEYWORD_SHORT = '.'
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
KEYWORD = 'list'.freeze
|
|
12
|
+
KEYWORD_SHORT = '.'.freeze
|
|
13
|
+
|
|
14
|
+
#
|
|
15
15
|
# Run the verb.
|
|
16
|
-
#
|
|
16
|
+
#
|
|
17
17
|
def run
|
|
18
18
|
levels = determine_levels
|
|
19
19
|
target = self.determine_target
|
|
@@ -30,33 +30,31 @@ module Gloo
|
|
|
30
30
|
# Check settings for the default value.
|
|
31
31
|
levels = $settings.list_indent
|
|
32
32
|
return levels if levels
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
# Last chance: use the default
|
|
35
35
|
return 1
|
|
36
36
|
end
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
# Determine the target object for the show command.
|
|
39
39
|
def determine_target
|
|
40
|
-
if @tokens.token_count == 1
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return Gloo::Core::Pn.new( @tokens.second )
|
|
44
|
-
end
|
|
40
|
+
return $engine.heap.context if @tokens.token_count == 1
|
|
41
|
+
|
|
42
|
+
return Gloo::Core::Pn.new( @tokens.second )
|
|
45
43
|
end
|
|
46
44
|
|
|
47
45
|
# Show the target object.
|
|
48
|
-
def show_target( obj, levels, indent=
|
|
46
|
+
def show_target( obj, levels, indent = '' )
|
|
49
47
|
show_obj( obj, indent )
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
obj.children.each do |o|
|
|
48
|
+
return if levels.zero?
|
|
49
|
+
|
|
50
|
+
obj.children.each do |o|
|
|
53
51
|
show_target( o, levels - 1, "#{indent} " )
|
|
54
52
|
end
|
|
55
53
|
end
|
|
56
|
-
|
|
54
|
+
|
|
57
55
|
# Show object in standard format.
|
|
58
|
-
def show_obj obj, indent=
|
|
59
|
-
if obj.
|
|
56
|
+
def show_obj( obj, indent = ' ' )
|
|
57
|
+
if obj.multiline_value? && obj.value_is_array?
|
|
60
58
|
$log.show "#{indent}#{obj.name} [#{obj.type_display}] :"
|
|
61
59
|
obj.value.each do |line|
|
|
62
60
|
$log.show "#{indent} #{line}"
|
|
@@ -65,21 +63,54 @@ module Gloo
|
|
|
65
63
|
$log.show "#{indent}#{obj.name} [#{obj.type_display}] : #{obj.value}"
|
|
66
64
|
end
|
|
67
65
|
end
|
|
68
|
-
|
|
69
|
-
#
|
|
66
|
+
|
|
67
|
+
#
|
|
70
68
|
# Get the Verb's keyword.
|
|
71
|
-
#
|
|
69
|
+
#
|
|
72
70
|
def self.keyword
|
|
73
71
|
return KEYWORD
|
|
74
72
|
end
|
|
75
73
|
|
|
76
|
-
#
|
|
74
|
+
#
|
|
77
75
|
# Get the Verb's keyword shortcut.
|
|
78
|
-
#
|
|
76
|
+
#
|
|
79
77
|
def self.keyword_shortcut
|
|
80
78
|
return KEYWORD_SHORT
|
|
81
79
|
end
|
|
82
80
|
|
|
81
|
+
# ---------------------------------------------------------------------
|
|
82
|
+
# Help
|
|
83
|
+
# ---------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
#
|
|
86
|
+
# Get help for this verb.
|
|
87
|
+
#
|
|
88
|
+
def self.help
|
|
89
|
+
return <<~TEXT
|
|
90
|
+
LIST VERB
|
|
91
|
+
NAME: list
|
|
92
|
+
SHORTCUT: .
|
|
93
|
+
|
|
94
|
+
DESCRIPTION
|
|
95
|
+
List out objects (and children) at the current context.
|
|
96
|
+
When a path is provided, it will be listed instead of the
|
|
97
|
+
current context.
|
|
98
|
+
|
|
99
|
+
SYNTAX
|
|
100
|
+
list <path.to.object>
|
|
101
|
+
|
|
102
|
+
PARAMETERS
|
|
103
|
+
path.to.object - Optional path to object that will be listed.
|
|
104
|
+
When no path is provided, the current context is used.
|
|
105
|
+
|
|
106
|
+
RESULT
|
|
107
|
+
Object and children are listed out in the CLI.
|
|
108
|
+
|
|
109
|
+
ERRORS
|
|
110
|
+
None
|
|
111
|
+
TEXT
|
|
112
|
+
end
|
|
113
|
+
|
|
83
114
|
end
|
|
84
115
|
end
|
|
85
116
|
end
|