cmdr
Check-in [27ba981e40]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:cmdr::color - Need -prefixes 0 to avoid name/names clash.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 27ba981e40b62675080ad3bfbf45010994314559
User & Date: aku 2014-05-26 17:19:41
Original Comment: fx::color - Need -prefixes 0 to avoid name/names clash.
Context
2014-05-28
23:33
cmdr::actor, cmdr::officer - Fix bug introduced with revision [7ab77ead21]. The option handling added to "actor::set" in that revision means that the command "my set *command* ..." storing the actual command line (i.e. user information) can break, trying to interpret application specific option information as something for the internal command. Fixed by adding "--" to "actor::set"s option handling, and using it for the breakable command to force interpretation of the user data as such. check-in: cd7539eb28 user: andreask tags: trunk
2014-05-26
17:19
cmdr::color - Need -prefixes 0 to avoid name/names clash. check-in: 27ba981e40 user: aku tags: trunk
2014-05-23
22:08
cmdr::ask - Added basic testsuite. More requires a linenoise mockup to prevent actual interaction while exercising the command implementation. check-in: 2fa5347d94 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to color.tcl.

32
33
34
35
36
37
38
39


40
41
42
43
44




45
46
47
48
49
50
51
    namespace ensemble create
}

namespace eval ::cmdr::color {
    namespace export \
	activate active names get get-def define exists unset
    namespace ensemble create \
	-unknown [namespace current]::Unknown


    # Note, the option ensures that all unknown methods are treated as
    # (list of) color codes to apply to some text, effectively
    # creating the virtual command
    #
    #    ::cmdr::color <codelist> <text>




    ##

    namespace import ::cmdr::tty
}

# # ## ### ##### ######## ############# #####################







|
>
>
|
|
|


>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    namespace ensemble create
}

namespace eval ::cmdr::color {
    namespace export \
	activate active names get get-def define exists unset
    namespace ensemble create \
	-unknown [namespace current]::Unknown \
	-prefixes 0

    # Note, the -unknown option ensures that all unknown methods are
    # treated as (list of) color codes to apply to some text,
    # effectively creating the virtual command
    #
    #    ::cmdr::color <codelist> <text>
    #
    # The -prefix 0 option ensures that we canuse the 'name'
    # color-code, without it will go to 'names' and then fail with
    # wrong#args due to the different expected syntax.
    ##

    namespace import ::cmdr::tty
}

# # ## ### ##### ######## ############# #####################