@@ -75,13 +75,13 @@ dump-obj: function [
75
75
]
76
76
]
77
77
][
78
- str: join "^[ [1;32;49m " form-pad word 15
79
- append str "^[ [0m "
78
+ str: join "^[ [1;32m " form-pad word 15
79
+ append str "^[ [m "
80
80
append str form-pad type 24 - ((length? str) - 15 )
81
81
append out reform [
82
82
" " str "^[ [32m"
83
83
if type <> 'unset! [form-val :val ]
84
- "^[ [0m ^/ "
84
+ "^[ [m ^/ "
85
85
]
86
86
]
87
87
]
@@ -96,45 +96,45 @@ dump-obj: function [
96
96
] [
97
97
if unset? get /any 'word [
98
98
print trim/auto {
99
- Use ^[ [1;32;49mHELP ^[ [0m or ^[ [1;32;49m ?^[ [0m to see built-in info:
100
- ^[ [1;32;49m
99
+ Use ^[ [1;32mHELP ^[ [m or ^[ [1;32m ?^[ [m to see built-in info:
100
+ ^[ [1;32m
101
101
help insert
102
102
? insert
103
- ^[ [0m
103
+ ^[ [m
104
104
To search within the system, use quotes:
105
- ^[ [1;32;49m
105
+ ^[ [1;32m
106
106
? "insert"
107
- ^[ [0m
107
+ ^[ [m
108
108
To browse online web documents:
109
- ^[ [1;32;49m
109
+ ^[ [1;32m
110
110
help/doc insert
111
- ^[ [0m
111
+ ^[ [m
112
112
To view words and values of a context or object:
113
113
114
- ^[ [1;32;49m ? lib^[ [0m - the runtime library
115
- ^[ [1;32;49m ? self^[ [0m - your user context
116
- ^[ [1;32;49m ? system^[ [0m - the system object
117
- ^[ [1;32;49m ? system/options^[ [0m - special settings
114
+ ^[ [1;32m ? lib^[ [m - the runtime library
115
+ ^[ [1;32m ? self^[ [m - your user context
116
+ ^[ [1;32m ? system^[ [m - the system object
117
+ ^[ [1;32m ? system/options^[ [m - special settings
118
118
119
119
To see all words of a specific datatype:
120
- ^[ [1;32;49m
120
+ ^[ [1;32m
121
121
? native!
122
122
? function!
123
123
? datatype!
124
- ^[ [0m
124
+ ^[ [m
125
125
Other debug functions:
126
126
127
- ^[ [1;32;49m ??^[ [0m - display a variable and its value
128
- ^[ [1;32;49mprobe ^[ [0m - print a value (molded)
129
- ^[ [1;32;49msource ^[ [0m - show source code of func
130
- ^[ [1;32;49mtrace ^[ [0m - trace evaluation steps
131
- ^[ [1;32;49mwhat ^[ [0m - show a list of known functions
127
+ ^[ [1;32m ??^[ [m - display a variable and its value
128
+ ^[ [1;32mprobe ^[ [m - print a value (molded)
129
+ ^[ [1;32msource ^[ [m - show source code of func
130
+ ^[ [1;32mtrace ^[ [m - trace evaluation steps
131
+ ^[ [1;32mwhat ^[ [m - show a list of known functions
132
132
133
133
Other information:
134
134
135
- ^[ [1;32;49mabout ^[ [0m - see general product info
136
- ^[ [1;32;49mlicense ^[ [0m - show user license
137
- ^[ [1;32;49musage ^[ [0m - program cmd line options
135
+ ^[ [1;32mabout ^[ [m - see general product info
136
+ ^[ [1;32mlicense ^[ [m - show user license
137
+ ^[ [1;32musage ^[ [m - program cmd line options
138
138
}
139
139
exit
140
140
]
@@ -194,23 +194,23 @@ dump-obj: function [
194
194
if all [word? :word datatype? get :word ] [
195
195
value: spec-of get :word
196
196
print ajoin [
197
- "^[ [1;32;49m " mold :word "^[ [0m is a datatype" newline
197
+ "^[ [1;32m " mold :word "^[ [m is a datatype" newline
198
198
"It is defined as " either find "aeiou" first value/title ["an " ] ["a " ] value/title newline
199
- "It is of the general type ^[ [1;32;49m " value/type "^[ [0m ^/ "
199
+ "It is of the general type ^[ [1;32m " value/type "^[ [m ^/ "
200
200
]
201
201
]
202
202
if any [:word = 'unset! not value? :word ] [exit]
203
203
types: dump-obj/match lib :word
204
204
sort types
205
205
if not empty? types [
206
- print ["Found these related words:^[ [32m" newline types "^[ [0m " ]
206
+ print ["Found these related words:^[ [32m" newline types "^[ [m " ]
207
207
exit
208
208
]
209
209
if all [word? :word datatype? get :word ] [
210
- print ["No values defined for^[ [1;32;49m " word "^[ [0m " ]
210
+ print ["No values defined for^[ [1;32m " word "^[ [m " ]
211
211
exit
212
212
]
213
- print ["No information on^[ [1;32;49m " word "^[ [0m " ]
213
+ print ["No information on^[ [1;32m " word "^[ [m " ]
214
214
exit
215
215
]
216
216
@@ -223,7 +223,7 @@ dump-obj: function [
223
223
224
224
; Print literal values:
225
225
if not any [word? :word path? :word ][
226
- print ajoin ["^[ [1;32;49m " mold :word "^[ [0m is " type-name :word ]
226
+ print ajoin ["^[ [1;32m " mold :word "^[ [m is " type-name :word ]
227
227
exit
228
228
]
229
229
@@ -250,9 +250,9 @@ dump-obj: function [
250
250
value: get :word
251
251
]
252
252
unless any-function? :value [
253
- prin ajoin ["^[ [1;32;49m " uppercase mold word "^[ [0m is " type-name :value " of value: ^[ [32m" ]
253
+ prin ajoin ["^[ [1;32m " uppercase mold word "^[ [m is " type-name :value " of value: ^[ [32m" ]
254
254
prin either any [object? value port? value] [print "" dump-obj value][mold /all :value ]
255
- print "^[ [0m "
255
+ print "^[ [m "
256
256
exit
257
257
]
258
258
@@ -261,7 +261,7 @@ dump-obj: function [
261
261
;if path? :word [word: first :word]
262
262
263
263
;-- Print info about function:
264
- prin "USAGE :^/^- "
264
+ prin "^[ [4;1;36mUSAGE ^[ [m :^/^- "
265
265
266
266
args: words-of :value
267
267
clear find args /local
@@ -272,7 +272,7 @@ dump-obj: function [
272
272
]
273
273
274
274
print ajoin [
275
- newline "DESCRIPTION :" newline
275
+ newline "^[ [4;1;36mDESCRIPTION ^[ [m :" newline
276
276
tab any [title-of :value "(undocumented)" ] newline
277
277
tab uppercase mold word " is " type-name :value " value."
278
278
]
@@ -309,8 +309,8 @@ dump-obj: function [
309
309
]
310
310
]
311
311
312
- print-args "^/ ARGUMENTS :" argl
313
- print-args/extra "^/ REFINEMENTS :" refl
312
+ print-args "^/^[ [4;1;36mARGUMENTS ^[ [m :" argl
313
+ print-args/extra "^/^[ [4;1;36mREFINEMENTS ^[ [m :" refl
314
314
]
315
315
316
316
exit ; return unset
@@ -327,43 +327,42 @@ about: func [
327
327
usage : func [
328
328
"Prints command-line arguments."
329
329
] [
330
- print trim/auto {
331
- Command line usage:
332
-
333
- REBOL |options| |script| |arguments|
334
-
335
- Standard options:
336
-
337
- --args data Explicit arguments to script (quoted)
338
- --do expr Evaluate expression (quoted)
339
- --help (-?) Display this usage information
340
- --script file Explicit script filename
341
- --version tuple Script must be this version or greater
342
-
343
- Special options:
344
-
345
- --boot level Valid levels: base sys mods
346
- --debug flags For user scripts (system/options/debug)
347
- --halt (-h) Leave console open when script is done
348
- --import file Import a module prior to script
349
- --quiet (-q) No startup banners or information
350
- --secure policy Can be: none allow ask throw quit
351
- --trace (-t) Enable trace mode during boot
352
- --verbose Show detailed startup information
353
-
354
- Other quick options:
355
-
356
- -s No security
357
- +s Full security
358
- -v Display version only (then quit)
359
-
360
- Examples:
361
-
362
- REBOL script.r
363
- REBOL -s script.r
364
- REBOL script.r 10:30 test@example.com
365
- REBOL --do "watch: on" script.r
366
- }
330
+ print {
331
+ ^[ [4;1;36mCommand line usage^[ [m:
332
+
333
+ ^[ [1;32mREBOL |options| |script| |arguments|^[ [m
334
+
335
+ ^[ [4;1;36mStandard options^[ [m:
336
+
337
+ ^[ [1;32m--args data^[ [m Explicit arguments to script (quoted)
338
+ ^[ [1;32m--do expr^[ [m Evaluate expression (quoted)
339
+ ^[ [1;32m--help (-?)^[ [m Display this usage information
340
+ ^[ [1;32m--script file^[ [m Explicit script filename
341
+ ^[ [1;32m--version tuple^[ [m Script must be this version or greater
342
+
343
+ ^[ [4;1;36mSpecial options^[ [m:
344
+
345
+ ^[ [1;32m--boot level^[ [m Valid levels: base sys mods
346
+ ^[ [1;32m--debug flags^[ [m For user scripts (system/options/debug)
347
+ ^[ [1;32m--halt (-h)^[ [m Leave console open when script is done
348
+ ^[ [1;32m--import file^[ [m Import a module prior to script
349
+ ^[ [1;32m--quiet (-q)^[ [m No startup banners or information
350
+ ^[ [1;32m--secure policy^[ [m Can be: none allow ask throw quit
351
+ ^[ [1;32m--trace (-t)^[ [m Enable trace mode during boot
352
+ ^[ [1;32m--verbose^[ [m Show detailed startup information
353
+
354
+ ^[ [4;1;36mOther quick options^[ [m:
355
+
356
+ ^[ [1;32m-s^[ [m No security
357
+ ^[ [1;32m+s^[ [m Full security
358
+ ^[ [1;32m-v^[ [m Display version only (then quit)
359
+
360
+ ^[ [4;1;36mExamples^[ [m:
361
+
362
+ REBOL script.r
363
+ REBOL -s script.r
364
+ REBOL script.r 10:30 test@example.com
365
+ REBOL --do "watch: on" script.r}
367
366
]
368
367
369
368
license : func [
0 commit comments