cmdr
Check-in [5a480bf9d8]
Not logged in

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

Overview
Comment:Extended the shells to note their activity in a root common block named *in-shell*. Bumped version to 0.11.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5a480bf9d8f1485e930092946f52a1ad5668e0d2
User & Date: andreask 2013-11-15 23:10:04
Context
2013-11-16
23:15
Moved dictsort utility into util for wider use. Sort parts of the help structures for easier testing. Fixed bugs in the help generation (1) Skip imported helper commands which are not formats. (2) Rendering of list inputs was off. -- Bumped version to 0.12, help (json, sql) to 0.2, fixed requirements -- Updated embedded documentation. check-in: 0ed8f3610b user: aku tags: trunk
2013-11-15
23:10
Extended the shells to note their activity in a root common block named *in-shell*. Bumped version to 0.11. check-in: 5a480bf9d8 user: andreask tags: trunk
07:41
Completed the split of the DSL documents. Regenerated the embedded docs. check-in: b7d756fe00 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to actor.tcl.

309
310
311
312
313
314
315
316

    ##
    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::actor 0.10







|
309
310
311
312
313
314
315
316

    ##
    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::actor 0.11

Changes to cmdr.tcl.

71
72
73
74
75
76
77
78
proc ::cmdr::interactive? {} {
    variable interactive
    return  $interactive
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr 0.10







|
71
72
73
74
75
76
77
78
proc ::cmdr::interactive? {} {
    variable interactive
    return  $interactive
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr 0.11

Changes to config.tcl.

1013
1014
1015
1016
1017
1018
1019

1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031

1032
1033
1034
1035
1036
1037
1038
....
1350
1351
1352
1353
1354
1355
1356
1357
	set myreplok     0 ; # Flag: We can't commit properly
	set myreplcommit 0 ; # Flag: We are not asked to commit yet.
	set myreplskip   0 ; # Flag: Do not report.

	my ShowState

	$shell history 1

	try {
	    $shell repl
	} trap {CMDR CONFIG INTERACT CANCEL} {e o} {
	    return 0
	} trap {CMDR CONFIG INTERACT OK} {e o} {
	    if {!$myreplok} {
		# Bad commit with incomplete data.
		my raise "Unable to perform \"[context fullname]\", incomplete or bad arguments" \
		    CMDR CONFIG COMMIT FAIL
	    }
	    return 1
	} finally {

	    $shell destroy
	}

	# Regular return indicates abort (^D), treat as cancellation.
	return 0
    }

................................................................................
    }

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::config 0.10







>












>







 







|
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
....
1352
1353
1354
1355
1356
1357
1358
1359
	set myreplok     0 ; # Flag: We can't commit properly
	set myreplcommit 0 ; # Flag: We are not asked to commit yet.
	set myreplskip   0 ; # Flag: Do not report.

	my ShowState

	$shell history 1
	[context root] set *in-shell* true
	try {
	    $shell repl
	} trap {CMDR CONFIG INTERACT CANCEL} {e o} {
	    return 0
	} trap {CMDR CONFIG INTERACT OK} {e o} {
	    if {!$myreplok} {
		# Bad commit with incomplete data.
		my raise "Unable to perform \"[context fullname]\", incomplete or bad arguments" \
		    CMDR CONFIG COMMIT FAIL
	    }
	    return 1
	} finally {
	    [context root] set *in-shell* false
	    $shell destroy
	}

	# Regular return indicates abort (^D), treat as cancellation.
	return 0
    }

................................................................................
    }

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::config 0.11

Changes to help.tcl.

510
511
512
513
514
515
516
517

    return $categories
}


# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::help 0.10







|
510
511
512
513
514
515
516
517

    return $categories
}


# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::help 0.11

Changes to officer.tcl.

324
325
326
327
328
329
330

331

332
333
334
335
336
337
338
	if {![llength $args] && ![my hasdefault] && [cmdr interactive?]} {
	    # Drop into a shell where the user can enter her commands
	    # interactively.

	    set shell [linenoise::facade new [self]]
	    set myreplexit 0 ; # Initialize stop signal, no stopping
	    $shell history 1

	    $shell repl

	    $shell destroy
	    return
	}

	my Do {*}$args
	return
    }







>

>







324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
	if {![llength $args] && ![my hasdefault] && [cmdr interactive?]} {
	    # Drop into a shell where the user can enter her commands
	    # interactively.

	    set shell [linenoise::facade new [self]]
	    set myreplexit 0 ; # Initialize stop signal, no stopping
	    $shell history 1
	    [my root] set *in-shell* true
	    $shell repl
	    [my root] set *in-shell* false
	    $shell destroy
	    return
	}

	my Do {*}$args
	return
    }

Changes to parameter.tcl.

1185
1186
1187
1188
1189
1190
1191
1192
	myisundefined

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::parameter 0.10







|
1185
1186
1187
1188
1189
1190
1191
1192
	myisundefined

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::parameter 0.11

Changes to private.tcl.

165
166
167
168
169
170
171
172
    variable myarguments mycmd myinit myconfig myhandler

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::private 0.10







|
165
166
167
168
169
170
171
172
    variable myarguments mycmd myinit myconfig myhandler

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::private 0.11

Changes to util.tcl.

58
59
60
61
62
63
64
65
    set res {}
    foreach str $list { lappend res [format "%-*s" $maxl $str] }
    return $res
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::util 0.10







|
58
59
60
61
62
63
64
65
    set res {}
    foreach str $list { lappend res [format "%-*s" $maxl $str] }
    return $res
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::util 0.11

Changes to validate.tcl.

317
318
319
320
321
322
323
324
325
    if {![file readable    $path]} {return 0}
    if {![file writable    $path]} {return 0}
    return 1
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::validate 0.10
return







|

317
318
319
320
321
322
323
324
325
    if {![file readable    $path]} {return 0}
    if {![file writable    $path]} {return 0}
    return 1
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::validate 0.11
return

Changes to vcommon.tcl.

105
106
107
108
109
110
111
112
113

    debug.cmdr/validate/common {= [join $candidates "\n= "]} 10
    return $candidates
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::validate::common 0.10
return







|

105
106
107
108
109
110
111
112
113

    debug.cmdr/validate/common {= [join $candidates "\n= "]} 10
    return $candidates
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::validate::common 0.11
return