Skip to content
Tcl Source Code History Of Ticket f27930150a84a15b
Login

History Of Ticket f27930150a84a15b

Artifacts Associated With Ticket f27930150a84a15b

  1. Ticket change [4f49fe57f4] (rid 153378) by pooryorick on 2017-04-28 13:47:00:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Some wild ensemble command behaviour when the name of the subcommand is the
      empty string:
      
      <verbatim>
      namespace eval n1 {
      	namespace export *
      	namespace ensemble create
      	namespace ensemble configure [namespace current] -map {
      		p1 {::puts yada}
      	}
      }
      n1 {} ;# -> yada
      proc n1:: {} {puts foo}
      n1 {} ;# -> yada
      namespace ensemble configure n1 -map {} ;
      n1 {} ;# -> foo
      
      namespace ensemble configure n1 -map {p1 {::puts yada} p2 {::puts bar}}
      n1 {} ;#-> unknown or ambiguous subcommand "": must be p1, or p2
      </verbatim>
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "pooryorick"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "e476148cded301ffff84bcdc432536dc0c949e88"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "pooryorick"
    14. subsystem initialized to: "21. [namespace]"
    15. title initialized to:
      namespace ensemble subcommands with the empty string for a name
      
    16. type initialized to: "Bug"
  2. Ticket change [38a6c672ab] (rid 153389) by aspect on 2017-04-28 15:39:16:

    1. icomment:
      This is a result of the default configuration `-prefixes true`: {} is an unambiguous prefix of p1.
      
    2. login: "aspect"
    3. mimetype: "text/plain"
  3. Ticket change [434764c05c] (rid 153452) by dkf on 2017-05-02 10:31:01:

    1. closedate changed to: "2457875.93821101"
    2. closer changed to: "dkf"
    3. icomment:
      The behaviour you describe is correct. There is no bug.
      <p>
      When an ensemble has an empty <tt>-map</tt> (and empty <tt>-subcommands</tt> list), it uses the exported commands of the namespace as the set of subcommands. When an ensemble has a non-empty <tt>-map</tt>, it uses the keys of that map to determine what the set of subcommands is. <i>In both cases</i>, it then finds whether there is an exact match for the subcommand name against its set of possible subcommands, and if there is no exact match and the <tt>-prefix</tt> option is true (the default), then sees whether the provided subcommand name is a prefix of exactly one subcommand name. (If there's two or more subcommands that could match, that's an error. The empty string is a prefix of all other strings of course.)
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "dkf"
  4. Ticket change [45cb3f4896] (rid 153453) by dkf on 2017-05-02 10:31:40:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2457875.93866211"
    3. login: "dkf"
    4. mimetype: "text/plain"