tcl-hacks

Check-in [cffea9ffda]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:procmap: inspect options and catch some more ensemble-y things in the process
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cffea9ffda4f33227bf3cfbb52c5b40eb13d0305
User & Date: aspect 2018-07-21 12:41:02
Context
2018-07-21
12:42
remove debugging prints check-in: ac60259978 user: aspect tags: trunk
12:41
procmap: inspect options and catch some more ensemble-y things in the process check-in: cffea9ffda user: aspect tags: trunk
2018-07-20
16:09
editor return to original cursor pos check-in: 7a57e200e9 user: aspect tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to procmap/procmap.tcl.

24
25
26
27
28
29
30
31
32
33
34
35
36

37
38
39



40

41
42
43
44
45
46
47
...
359
360
361
362
363
364
365
























366
367
368
369
370
371
372
# as lists, suitable for 
#  foreach r $bar z $baz { ... }
# This can not be permitted alongside args.
# Alongside that "literal" would be nice too ... or maybe $literal? is an inversion too cute?
#
namespace eval procmap {
    proc DecodeUnknownArgs {err cmd} {
        set re [string map {` \"} {(?:bad|unknown(?: or ambiguous))? (?:(?:sub)?command|method|option|argument) `([^`]*)`: must be(?: one of)?:? +(.*) or (.*)}]
        if {[regexp $re $err -> subcmd alts altz]} {
            set alts [string trimright $alts { ,}]
            set alts [split $alts ,]
            set alts [lmap x $alts {string trim $x}]
            lappend alts $altz

        } else {
            throw {PROCMAP DECODE} "Failed to decode Unknown message \"$err\""
        }



        return [dict create subcommands $alts]

    }
    proc DecodeWrongArgs {err cmd} {
        set re [string map {` \"} {^wrong # args: should be(.*)$}]
        set qre [string map {` \"} { +`([^`]*)`}]
        if {[regexp $re $err -> match]} {
            set argspecs [lmap {_ match} [regexp -inline -all $qre $match] {
                if {[string match $cmd* $match]} {
................................................................................
                set res [procmap::examine $cmd]
            }
            if {$cmd in $doms || -1 != [lsearch -glob [dict get $res arghelps] "subcommand*"]} {
                set res [dict merge $res [procmap::examine [list {*}$cmd NOSUCHSUBCOMMANDEVEREVERISAYEVER]]]
            }
            if {[dict exists $res subcommands]} {
                lappend procs {*}[lmap sub [dict get $res subcommands] {list {*}$cmd $sub}]
























            }
            puts ">> $res"
            dict set arghelp $cmd $res
        }
    }
}








|
|
|
|
|
<
>



>
>
>
|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







24
25
26
27
28
29
30
31
32
33
34
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# as lists, suitable for 
#  foreach r $bar z $baz { ... }
# This can not be permitted alongside args.
# Alongside that "literal" would be nice too ... or maybe $literal? is an inversion too cute?
#
namespace eval procmap {
    proc DecodeUnknownArgs {err cmd} {
        set re [string map {` \"} {(?:[Bb]ad|[Uu]nknown(?: or ambiguous))? (?:(?:sub)?command|method|option|argument|mode) `([^`]*)`: (?:must|should) be(?: one of)?:? +(.*)}]
        if {[regexp $re $err -> subcmd alts]} {
            set alts [regexp -all -inline {\w+} $alts]
            if {[lindex $alts end-1] eq "or"} {
                set alts [lreplace $alts end-1 end-1]

            }
        } else {
            throw {PROCMAP DECODE} "Failed to decode Unknown message \"$err\""
        }
        if {[string match -* [lindex $alts 0]]} {
            return [dict create options $alts]
        } else {
            return [dict create subcommands $alts]
        }
    }
    proc DecodeWrongArgs {err cmd} {
        set re [string map {` \"} {^wrong # args: should be(.*)$}]
        set qre [string map {` \"} { +`([^`]*)`}]
        if {[regexp $re $err -> match]} {
            set argspecs [lmap {_ match} [regexp -inline -all $qre $match] {
                if {[string match $cmd* $match]} {
................................................................................
                set res [procmap::examine $cmd]
            }
            if {$cmd in $doms || -1 != [lsearch -glob [dict get $res arghelps] "subcommand*"]} {
                set res [dict merge $res [procmap::examine [list {*}$cmd NOSUCHSUBCOMMANDEVEREVERISAYEVER]]]
            }
            if {[dict exists $res subcommands]} {
                lappend procs {*}[lmap sub [dict get $res subcommands] {list {*}$cmd $sub}]
            }
            if {[dict exists $res arghelps]} {
                foreach argspec [dict get $res arghelps] {
                    # option ?options? ?options...?
                    # "?-option ...?" "?-option value ...?" "?option value ..." "?-option value...?"
                    set re {\moptions?\M|\?-?options?\M[^?]*\?}
                    if {[regexp $re $argspec -> optstr]} {
                        if {[string match "*value*" $optstr]} {
                            regsub $re $argspec "-nosuchoption xxx" argspec
                        } else {
                            regsub $re $argspec "-nosuchoption" argspec
                        }
                        regsub -all {\?.*?\?} $argspec "" argspec
                        regsub -all {\.\.\.} $argspec "" argspec
                        regsub -all channelId $argspec stdin argspec
                        regsub -all className $argspec ::oo::class argspec
                        regsub -all objName $argspec ::oo::object argspec
                        regsub -all cmdname $argspec namespace argspec  ;# this should be an ensemble
                        puts "Res before: $res"
                        puts "Calling: $cmd $argspec"
                        set res [dict merge $res [procmap::examine [list {*}$cmd {*}$argspec]]]
                        puts "Res after: $res"
                    }
                }
            }
            puts ">> $res"
            dict set arghelp $cmd $res
        }
    }
}

Changes to procmap/procmap_lib.tcl.

1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
...
265
266
267
268
269
270
271





272
273
274
275
276
277
278
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
...
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
...
391
392
393
394
395
396
397
398





399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
...
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
...
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
...
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
...
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
...
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
# Tcl 8.6.4 from /home/aspect/tclenv/bin/tclsh at (1437662027) Fri Jul 24 00:33:47 AEST 2015
#	tcl_platform(osVersion)      = 3.16.0-4-amd64
#	tcl_platform(pointerSize)    = 8
#	tcl_platform(byteOrder)      = littleEndian
#	tcl_platform(threaded)       = 1
#	tcl_platform(machine)        = x86_64
#	tcl_platform(platform)       = unix
#	tcl_platform(pathSeparator)  = :
#	tcl_platform(os)             = Linux

#	tcl_platform(user)           = aspect
#	tcl_platform(wordSize)       = 8
set ::procmap::procs {
	::tell ::tell
	::socket ::socket
	::subst ::subst
	::open ::open
................................................................................
	::fileevent ::fileevent
	::yieldto ::yieldto
	::regexp ::regexp
	::lrepeat ::lrepeat
	::upvar ::upvar
	::tailcall ::tailcall
	::encoding ::encoding





	::expr ::expr
	::unset ::unset
	::load ::load
	::regsub ::regsub
	::interp ::interp
	::exit ::exit
	::puts ::puts
................................................................................
	{::string trimright} ::tcl::string::trimright
	{::string wordend} ::tcl::string::wordend
	{::string wordstart} ::tcl::string::wordstart
	::yield ::yield
}

set ::procmap::arghelp {
	::after {arghelps {{option ?arg ...?}}}
	::append {arghelps {{varName ?value ...?}}}
	::apply {arghelps {{lambdaExpr ?arg ...?}}}
	::array {arghelps {{subcommand ?arg ...?}} subcommands {anymore donesearch exists get names nextelement set size startsearch statistics unset}}
	{::array anymore} {arghelps {{arrayName searchId}}}
	{::array donesearch} {arghelps {{arrayName searchId}}}
	{::array exists} {arghelps arrayName}
	{::array get} {arghelps {{arrayName ?pattern?}}}
................................................................................
	::auto_execok {arghelps name}
	::auto_import {arghelps pattern}
	::auto_load {arghelps {{cmd ?namespace?}}}
	::auto_load_index {arghelps {{}}}
	::auto_qualify {arghelps {{cmd namespace}}}
	::binary {arghelps {{subcommand ?arg ...?}} subcommands {decode encode format scan}}
	{::binary decode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary decode base64} {arghelps {{?options? data}}}
	{::binary decode hex} {arghelps {{?options? data}}}
	{::binary decode uuencode} {arghelps {{?options? data}}}
	{::binary encode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary encode base64} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary encode hex} {arghelps data}
	{::binary encode uuencode} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary format} {arghelps {{formatString ?arg ...?}}}
	{::binary scan} {arghelps {{value formatString ?varName ...?}}}
	::break {arghelps ::break}
	::case {arghelps {{string ?in? ?pattern body ...? ?default body?}}}
	::catch {arghelps {{script ?resultVarName? ?optionVarName?}}}
	::cd {arghelps ?dirName?}
	::chan {arghelps {{subcommand ?arg ...?}} subcommands {blocked close configure copy create eof event flush gets names pending pipe pop postevent push puts read seek tell truncate}}
	{::chan blocked} {arghelps channelId}
	{::chan close} {arghelps {{channelId ?direction?}}}
	{::chan configure} {arghelps {{channelId ?-option value ...?}}}
	{::chan copy} {arghelps {{input output ?-size size? ?-command callback?}}}
	{::chan create} {arghelps {{mode cmdprefix}}}
	{::chan eof} {arghelps channelId}
	{::chan event} {arghelps {{channelId event ?script?}}}
	{::chan flush} {arghelps channelId}
	{::chan gets} {arghelps {{channelId ?varName?}}}
	{::chan names} {arghelps ?pattern?}
................................................................................
	{::dict replace} {arghelps {{dictionary ?key value ...?}}}
	{::dict set} {arghelps {{dictVarName key ?key ...? value}}}
	{::dict size} {arghelps dictionary}
	{::dict unset} {arghelps {{dictVarName key ?key ...?}}}
	{::dict update} {arghelps {{dictVarName key varName ?key varName ...? script}}}
	{::dict values} {arghelps {{dictionary ?pattern?}}}
	{::dict with} {arghelps {{dictVarName ?key ...? script}}}
	::encoding {arghelps {{option ?arg ...?}}}





	::eof {arghelps channelId}
	::error {arghelps {{message ?errorInfo? ?errorCode?}}}
	::eval {arghelps {{arg ?arg ...?}}}
	::exec {arghelps {{?-option ...? arg ?arg ...?}}}
	::exit {arghelps ?returnCode?}
	::expr {arghelps {{arg ?arg ...?}}}
	::fblocked {arghelps channelId}
	::fconfigure {arghelps {{channelId ?-option value ...?}}}
	::fcopy {arghelps {{input output ?-size size? ?-command callback?}}}
	::file {arghelps {{subcommand ?arg ...?}} subcommands {atime attributes channels copy delete dirname executable exists extension isdirectory isfile join link lstat mkdir mtime nativename normalize owned pathtype readable readlink rename rootname separator size split stat system tail tempfile type volumes writable}}
	{::file atime} {arghelps {{name ?time?}}}
	{::file attributes} {arghelps {{name ?-option value ...?}}}
	{::file channels} {arghelps ?pattern?}
	{::file copy} {arghelps {{?-option value ...? source ?source ...? target}}}
	{::file dirname} {arghelps name}
	{::file executable} {arghelps name}
	{::file exists} {arghelps name}
	{::file extension} {arghelps name}
	{::file isdirectory} {arghelps name}
	{::file isfile} {arghelps name}
	{::file join} {arghelps {{name ?name ...?}}}
................................................................................
	{::file mtime} {arghelps {{name ?time?}}}
	{::file nativename} {arghelps name}
	{::file normalize} {arghelps name}
	{::file owned} {arghelps name}
	{::file pathtype} {arghelps name}
	{::file readable} {arghelps name}
	{::file readlink} {arghelps name}
	{::file rename} {arghelps {{?-option value ...? source ?source ...? target}}}
	{::file rootname} {arghelps name}
	{::file separator} {arghelps ?name?}
	{::file size} {arghelps name}
	{::file split} {arghelps name}
	{::file stat} {arghelps {{name varName}}}
	{::file system} {arghelps name}
	{::file tail} {arghelps name}
................................................................................
	{::info class call} {arghelps {{className methodName}}}
	{::info class constructor} {arghelps className}
	{::info class definition} {arghelps {{className methodName}}}
	{::info class destructor} {arghelps className}
	{::info class filters} {arghelps className}
	{::info class forward} {arghelps {{className methodName}}}
	{::info class instances} {arghelps {{className ?pattern?}}}
	{::info class methods} {arghelps {{className ?-option value ...?}}}
	{::info class methodtype} {arghelps {{className methodName}}}
	{::info class mixins} {arghelps className}
	{::info class subclasses} {arghelps {{className ?pattern?}}}
	{::info class superclasses} {arghelps className}
	{::info class variables} {arghelps className}
	{::info cmdcount} {arghelps {{}}}
	{::info commands} {arghelps ?pattern?}
................................................................................
	{::info object} {arghelps {{subcommand ?arg ...?}} subcommands {call class definition filters forward isa methods methodtype mixins namespace variables vars}}
	{::info object call} {arghelps {{objName methodName}}}
	{::info object class} {arghelps {{objName ?className?}}}
	{::info object definition} {arghelps {{objName methodName}}}
	{::info object filters} {arghelps objName}
	{::info object forward} {arghelps {{objName methodName}}}
	{::info object isa} {arghelps {{category objName ?arg ...?}}}
	{::info object methods} {arghelps {{objName ?-option value ...?}}}
	{::info object methodtype} {arghelps {{objName methodName}}}
	{::info object mixins} {arghelps objName}
	{::info object namespace} {arghelps objName}
	{::info object variables} {arghelps objName}
	{::info object vars} {arghelps {{objName ?pattern?}}}
	{::info patchlevel} {arghelps {{}}}
	{::info procs} {arghelps ?pattern?}
................................................................................
	::llength {arghelps list}
	::lmap {arghelps {{varList list ?varList list ...? command}}}
	::load {arghelps {{?-global? ?-lazy? ?--? fileName ?packageName? ?interp?}}}
	::lrange {arghelps {{list first last}}}
	::lrepeat {arghelps {{count ?value ...?}}}
	::lreplace {arghelps {{list first last ?element ...?}}}
	::lreverse {arghelps list}
	::lsearch {arghelps {{?-option value ...? list pattern}}}
	::lset {arghelps {{listVar ?index? ?index ...? value}}}
	::lsort {arghelps {{?-option value ...? list}}}
	::namespace {arghelps {{subcommand ?arg ...?}} subcommands {children code current delete ensemble eval exists export forget import inscope origin parent path qualifiers tail unknown upvar which}}
	{::namespace children} {arghelps {{?name? ?pattern?}}}
	{::namespace code} {arghelps arg}
	{::namespace current} {arghelps {{}}}
	{::namespace ensemble} {arghelps {{subcommand ?arg ...?}} subcommands {configure create exists}}
	{::namespace eval} {arghelps {{name arg ?arg...?}}}
	{::namespace exists} {arghelps name}
................................................................................
	{::namespace path} {arghelps ?pathList?}
	{::namespace qualifiers} {arghelps string}
	{::namespace tail} {arghelps string}
	{::namespace unknown} {arghelps ?script?}
	{::namespace upvar} {arghelps {{ns ?otherVar myVar ...?}}}
	{::namespace which} {arghelps {{?-command? ?-variable? name}}}
	::open {arghelps {{fileName ?access? ?permissions?}}}
	::package {arghelps {{option ?arg ...?}}}
	::pid {arghelps ?channelId?}
	::proc {arghelps {{name args body}}}
	::puts {arghelps {{?-nonewline? ?channelId? string}}}
	::pwd {arghelps {{}}}
	::read {arghelps {{channelId ?numChars?} {?-nonewline? channelId}}}
	::regexp {arghelps {{?-option ...? exp string ?matchVar? ?subMatchVar ...?}}}
	::regsub {arghelps {{?-option ...? exp string subSpec ?varName?}}}
	::rename {arghelps {{oldName newName}}}
	::scan {arghelps {{string format ?varName ...?}}}
	::seek {arghelps {{channelId offset ?origin?}}}
	::set {arghelps {{varName ?newValue?}}}
	::socket {arghelps {{?-myaddr addr? ?-myport myport? ?-async? host port} {-server command ?-myaddr addr? port}}}
	::source {arghelps {{?-encoding name? fileName}}}
	::split {arghelps {{string ?splitChars?}}}
................................................................................
	{::string wordstart} {arghelps {{string index}}}
	::subst {arghelps {{?-nobackslashes? ?-nocommands? ?-novariables? string}}}
	::switch {arghelps {{?-option ...? string ?pattern body ...? ?default body?}}}
	::tclLog {arghelps string}
	::tell {arghelps channelId}
	::throw {arghelps {{type message}}}
	::time {arghelps {{command ?count?}}}
	::trace {arghelps {{option ?arg ...?}}}
	::try {arghelps {{body ?handler ...? ?finally script?}}}
	::unload {arghelps {{?-switch ...? fileName ?packageName? ?interp?}}}
	::update {arghelps ?idletasks?}
	::uplevel {arghelps {{?level? command ?arg ...?}}}
	::upvar {arghelps {{?level? otherVar localVar ?otherVar localVar ...?}}}
	::vwait {arghelps name}
	::while {arghelps {{test command}}}
	::zlib {arghelps {{command arg ?...?}} subcommands {adler32 compress crc32 decompress deflate gunzip gzip inflate push stream}}
	{::namespace ensemble configure} {arghelps {{cmdname ?-option value ...? ?arg ...?}}}
	{::namespace ensemble create} {arghelps {{?option value ...?}}}
	{::namespace ensemble exists} {arghelps cmdname}
	{::zlib adler32} {arghelps {{data ?startValue?}}}
	{::zlib compress} {arghelps {{data ?level?}}}
	{::zlib crc32} {arghelps {{data ?startValue?}}}
	{::zlib decompress} {arghelps {{data ?bufferSize?}}}
	{::zlib deflate} {arghelps {{data ?level?}}}
	{::zlib gunzip} {arghelps {{data ?-headerVar varName?}}}
	{::zlib gzip} {arghelps {{data ?-level level? ?-header header?}}}
	{::zlib inflate} {arghelps {{data ?bufferSize?}}}
	{::zlib push} {arghelps {{mode channel ?options...?}}}
	{::zlib stream} {arghelps {{mode ?-option value...?}}}
}

|
|







>







 







>
>
>
>
>







 







|







 







|
|
|













|







 







|
>
>
>
>
>



|



|



|

|







 







|







 







|







 







|







 







|

|







 







|





|
|







 







|








|
|









|
|


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
...
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
...
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
...
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
...
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# Tcl 8.6.8 from /bin/tclsh at (1532176769) Sat Jul 21 22:09:29 ACST 2018
#	tcl_platform(osVersion)      = 4.17.3-200.fc28.x86_64
#	tcl_platform(pointerSize)    = 8
#	tcl_platform(byteOrder)      = littleEndian
#	tcl_platform(threaded)       = 1
#	tcl_platform(machine)        = x86_64
#	tcl_platform(platform)       = unix
#	tcl_platform(pathSeparator)  = :
#	tcl_platform(os)             = Linux
#	tcl_platform(engine)         = Tcl
#	tcl_platform(user)           = aspect
#	tcl_platform(wordSize)       = 8
set ::procmap::procs {
	::tell ::tell
	::socket ::socket
	::subst ::subst
	::open ::open
................................................................................
	::fileevent ::fileevent
	::yieldto ::yieldto
	::regexp ::regexp
	::lrepeat ::lrepeat
	::upvar ::upvar
	::tailcall ::tailcall
	::encoding ::encoding
	{::encoding convertfrom} ::tcl::encoding::convertfrom
	{::encoding convertto} ::tcl::encoding::convertto
	{::encoding dirs} ::tcl::encoding::dirs
	{::encoding names} ::tcl::encoding::names
	{::encoding system} ::tcl::encoding::system
	::expr ::expr
	::unset ::unset
	::load ::load
	::regsub ::regsub
	::interp ::interp
	::exit ::exit
	::puts ::puts
................................................................................
	{::string trimright} ::tcl::string::trimright
	{::string wordend} ::tcl::string::wordend
	{::string wordstart} ::tcl::string::wordstart
	::yield ::yield
}

set ::procmap::arghelp {
	::after {arghelps {{option ?arg ...?}} subcommands {cancel idle info or an integer}}
	::append {arghelps {{varName ?value ...?}}}
	::apply {arghelps {{lambdaExpr ?arg ...?}}}
	::array {arghelps {{subcommand ?arg ...?}} subcommands {anymore donesearch exists get names nextelement set size startsearch statistics unset}}
	{::array anymore} {arghelps {{arrayName searchId}}}
	{::array donesearch} {arghelps {{arrayName searchId}}}
	{::array exists} {arghelps arrayName}
	{::array get} {arghelps {{arrayName ?pattern?}}}
................................................................................
	::auto_execok {arghelps name}
	::auto_import {arghelps pattern}
	::auto_load {arghelps {{cmd ?namespace?}}}
	::auto_load_index {arghelps {{}}}
	::auto_qualify {arghelps {{cmd namespace}}}
	::binary {arghelps {{subcommand ?arg ...?}} subcommands {decode encode format scan}}
	{::binary decode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary decode base64} {arghelps {{?options? data}} subcommands strict}
	{::binary decode hex} {arghelps {{?options? data}} subcommands strict}
	{::binary decode uuencode} {arghelps {{?options? data}} subcommands strict}
	{::binary encode} {arghelps {{subcommand ?arg ...?}} subcommands {base64 hex uuencode}}
	{::binary encode base64} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary encode hex} {arghelps data}
	{::binary encode uuencode} {arghelps {{?-maxlen len? ?-wrapchar char? data}}}
	{::binary format} {arghelps {{formatString ?arg ...?}}}
	{::binary scan} {arghelps {{value formatString ?varName ...?}}}
	::break {arghelps ::break}
	::case {arghelps {{string ?in? ?pattern body ...? ?default body?}}}
	::catch {arghelps {{script ?resultVarName? ?optionVarName?}}}
	::cd {arghelps ?dirName?}
	::chan {arghelps {{subcommand ?arg ...?}} subcommands {blocked close configure copy create eof event flush gets names pending pipe pop postevent push puts read seek tell truncate}}
	{::chan blocked} {arghelps channelId}
	{::chan close} {arghelps {{channelId ?direction?}}}
	{::chan configure} {arghelps {{channelId ?-option value ...?}} subcommands {blocking buffering buffersize encoding eofchar translation mode queue ttystatus xchar}}
	{::chan copy} {arghelps {{input output ?-size size? ?-command callback?}}}
	{::chan create} {arghelps {{mode cmdprefix}}}
	{::chan eof} {arghelps channelId}
	{::chan event} {arghelps {{channelId event ?script?}}}
	{::chan flush} {arghelps channelId}
	{::chan gets} {arghelps {{channelId ?varName?}}}
	{::chan names} {arghelps ?pattern?}
................................................................................
	{::dict replace} {arghelps {{dictionary ?key value ...?}}}
	{::dict set} {arghelps {{dictVarName key ?key ...? value}}}
	{::dict size} {arghelps dictionary}
	{::dict unset} {arghelps {{dictVarName key ?key ...?}}}
	{::dict update} {arghelps {{dictVarName key varName ?key varName ...? script}}}
	{::dict values} {arghelps {{dictionary ?pattern?}}}
	{::dict with} {arghelps {{dictVarName ?key ...? script}}}
	::encoding {arghelps {{subcommand ?arg ...?}} subcommands {convertfrom convertto dirs names system}}
	{::encoding convertfrom} {arghelps {{?encoding? data}}}
	{::encoding convertto} {arghelps {{?encoding? data}}}
	{::encoding dirs} {arghelps ?dirList?}
	{::encoding names} {arghelps {{}}}
	{::encoding system} {arghelps ?encoding?}
	::eof {arghelps channelId}
	::error {arghelps {{message ?errorInfo? ?errorCode?}}}
	::eval {arghelps {{arg ?arg ...?}}}
	::exec {arghelps {{?-option ...? arg ?arg ...?}} subcommands {ignorestderr keepnewline or}}
	::exit {arghelps ?returnCode?}
	::expr {arghelps {{arg ?arg ...?}}}
	::fblocked {arghelps channelId}
	::fconfigure {arghelps {{channelId ?-option value ...?}} subcommands {blocking buffering buffersize encoding eofchar translation mode queue ttystatus xchar}}
	::fcopy {arghelps {{input output ?-size size? ?-command callback?}}}
	::file {arghelps {{subcommand ?arg ...?}} subcommands {atime attributes channels copy delete dirname executable exists extension isdirectory isfile join link lstat mkdir mtime nativename normalize owned pathtype readable readlink rename rootname separator size split stat system tail tempfile type volumes writable}}
	{::file atime} {arghelps {{name ?time?}}}
	{::file attributes} {arghelps {{name ?-option value ...?}} subcommands {group owner permissions}}
	{::file channels} {arghelps ?pattern?}
	{::file copy} {arghelps {{?-option value ...? source ?source ...? target}} subcommands {force or}}
	{::file dirname} {arghelps name}
	{::file executable} {arghelps name}
	{::file exists} {arghelps name}
	{::file extension} {arghelps name}
	{::file isdirectory} {arghelps name}
	{::file isfile} {arghelps name}
	{::file join} {arghelps {{name ?name ...?}}}
................................................................................
	{::file mtime} {arghelps {{name ?time?}}}
	{::file nativename} {arghelps name}
	{::file normalize} {arghelps name}
	{::file owned} {arghelps name}
	{::file pathtype} {arghelps name}
	{::file readable} {arghelps name}
	{::file readlink} {arghelps name}
	{::file rename} {arghelps {{?-option value ...? source ?source ...? target}} subcommands {force or}}
	{::file rootname} {arghelps name}
	{::file separator} {arghelps ?name?}
	{::file size} {arghelps name}
	{::file split} {arghelps name}
	{::file stat} {arghelps {{name varName}}}
	{::file system} {arghelps name}
	{::file tail} {arghelps name}
................................................................................
	{::info class call} {arghelps {{className methodName}}}
	{::info class constructor} {arghelps className}
	{::info class definition} {arghelps {{className methodName}}}
	{::info class destructor} {arghelps className}
	{::info class filters} {arghelps className}
	{::info class forward} {arghelps {{className methodName}}}
	{::info class instances} {arghelps {{className ?pattern?}}}
	{::info class methods} {arghelps {{className ?-option value ...?}} subcommands {all localprivate private}}
	{::info class methodtype} {arghelps {{className methodName}}}
	{::info class mixins} {arghelps className}
	{::info class subclasses} {arghelps {{className ?pattern?}}}
	{::info class superclasses} {arghelps className}
	{::info class variables} {arghelps className}
	{::info cmdcount} {arghelps {{}}}
	{::info commands} {arghelps ?pattern?}
................................................................................
	{::info object} {arghelps {{subcommand ?arg ...?}} subcommands {call class definition filters forward isa methods methodtype mixins namespace variables vars}}
	{::info object call} {arghelps {{objName methodName}}}
	{::info object class} {arghelps {{objName ?className?}}}
	{::info object definition} {arghelps {{objName methodName}}}
	{::info object filters} {arghelps objName}
	{::info object forward} {arghelps {{objName methodName}}}
	{::info object isa} {arghelps {{category objName ?arg ...?}}}
	{::info object methods} {arghelps {{objName ?-option value ...?}} subcommands {all localprivate private}}
	{::info object methodtype} {arghelps {{objName methodName}}}
	{::info object mixins} {arghelps objName}
	{::info object namespace} {arghelps objName}
	{::info object variables} {arghelps objName}
	{::info object vars} {arghelps {{objName ?pattern?}}}
	{::info patchlevel} {arghelps {{}}}
	{::info procs} {arghelps ?pattern?}
................................................................................
	::llength {arghelps list}
	::lmap {arghelps {{varList list ?varList list ...? command}}}
	::load {arghelps {{?-global? ?-lazy? ?--? fileName ?packageName? ?interp?}}}
	::lrange {arghelps {{list first last}}}
	::lrepeat {arghelps {{count ?value ...?}}}
	::lreplace {arghelps {{list first last ?element ...?}}}
	::lreverse {arghelps list}
	::lsearch {arghelps {{?-option value ...? list pattern}} subcommands {all ascii bisect decreasing dictionary exact glob increasing index inline integer nocase not real regexp sorted start subindices}}
	::lset {arghelps {{listVar ?index? ?index ...? value}}}
	::lsort {arghelps {{?-option value ...? list}} subcommands {ascii command decreasing dictionary increasing index indices integer nocase real stride unique}}
	::namespace {arghelps {{subcommand ?arg ...?}} subcommands {children code current delete ensemble eval exists export forget import inscope origin parent path qualifiers tail unknown upvar which}}
	{::namespace children} {arghelps {{?name? ?pattern?}}}
	{::namespace code} {arghelps arg}
	{::namespace current} {arghelps {{}}}
	{::namespace ensemble} {arghelps {{subcommand ?arg ...?}} subcommands {configure create exists}}
	{::namespace eval} {arghelps {{name arg ?arg...?}}}
	{::namespace exists} {arghelps name}
................................................................................
	{::namespace path} {arghelps ?pathList?}
	{::namespace qualifiers} {arghelps string}
	{::namespace tail} {arghelps string}
	{::namespace unknown} {arghelps ?script?}
	{::namespace upvar} {arghelps {{ns ?otherVar myVar ...?}}}
	{::namespace which} {arghelps {{?-command? ?-variable? name}}}
	::open {arghelps {{fileName ?access? ?permissions?}}}
	::package {arghelps {{option ?arg ...?}} subcommands {forget ifneeded names prefer present provide require unknown vcompare versions vsatisfies}}
	::pid {arghelps ?channelId?}
	::proc {arghelps {{name args body}}}
	::puts {arghelps {{?-nonewline? ?channelId? string}}}
	::pwd {arghelps {{}}}
	::read {arghelps {{channelId ?numChars?} {?-nonewline? channelId}}}
	::regexp {arghelps {{?-option ...? exp string ?matchVar? ?subMatchVar ...?}} subcommands {all about indices inline expanded line linestop lineanchor nocase start or}}
	::regsub {arghelps {{?-option ...? exp string subSpec ?varName?}} subcommands {all nocase expanded line linestop lineanchor start or}}
	::rename {arghelps {{oldName newName}}}
	::scan {arghelps {{string format ?varName ...?}}}
	::seek {arghelps {{channelId offset ?origin?}}}
	::set {arghelps {{varName ?newValue?}}}
	::socket {arghelps {{?-myaddr addr? ?-myport myport? ?-async? host port} {-server command ?-myaddr addr? port}}}
	::source {arghelps {{?-encoding name? fileName}}}
	::split {arghelps {{string ?splitChars?}}}
................................................................................
	{::string wordstart} {arghelps {{string index}}}
	::subst {arghelps {{?-nobackslashes? ?-nocommands? ?-novariables? string}}}
	::switch {arghelps {{?-option ...? string ?pattern body ...? ?default body?}}}
	::tclLog {arghelps string}
	::tell {arghelps channelId}
	::throw {arghelps {{type message}}}
	::time {arghelps {{command ?count?}}}
	::trace {arghelps {{option ?arg ...?}} subcommands {add info remove variable vdelete vinfo}}
	::try {arghelps {{body ?handler ...? ?finally script?}}}
	::unload {arghelps {{?-switch ...? fileName ?packageName? ?interp?}}}
	::update {arghelps ?idletasks?}
	::uplevel {arghelps {{?level? command ?arg ...?}}}
	::upvar {arghelps {{?level? otherVar localVar ?otherVar localVar ...?}}}
	::vwait {arghelps name}
	::while {arghelps {{test command}}}
	::zlib {arghelps {{command arg ?...?}} subcommands {adler32 compress crc32 decompress deflate gunzip gzip inflate push stream}}
	{::namespace ensemble configure} {arghelps {{cmdname ?-option value ...? ?arg ...?}} subcommands {map namespace parameters prefixes subcommands unknown}}
	{::namespace ensemble create} {arghelps {{ensemble create ?option value ...?}}}
	{::namespace ensemble exists} {arghelps cmdname}
	{::zlib adler32} {arghelps {{data ?startValue?}}}
	{::zlib compress} {arghelps {{data ?level?}}}
	{::zlib crc32} {arghelps {{data ?startValue?}}}
	{::zlib decompress} {arghelps {{data ?bufferSize?}}}
	{::zlib deflate} {arghelps {{data ?level?}}}
	{::zlib gunzip} {arghelps {{data ?-headerVar varName?}}}
	{::zlib gzip} {arghelps {{data ?-level level? ?-header header?}}}
	{::zlib inflate} {arghelps {{data ?bufferSize?}}}
	{::zlib push} {arghelps {{mode channel ?options...?}} subcommands {compress decompress deflate gunzip gzip inflate}}
	{::zlib stream} {arghelps {{stream mode ?-option value...?}}}
}