Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c66d03230b669d8ff1972abe6a7591b95e1a4c4bcdb2a401c855dd3a7d74cd75
Ticket: edebb6a4ff741f7e7ddcaa17355640a586b52502
lsearch -index requires nested items to exist
User & Date: pooryorick on 2024-11-08 11:45:39
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    The following command,
    
    <code><verbatim>
    lsearch -index 0 {{} one two three} one
    </verbatim></code>
    
    Fails with the error
    
    <code><verbatim>
    element 0 missing from sublist ""
    </verbatim></code>
    
    lsearch would be more useful if the meaning of "-index" was just "match against
    each value that has such an item", without the additional "each value must have
    such an item" constraint.  A script that uses lsearch is usually more
    interested in determing which items match, not ensuring that all items meet
    some criteria.
    
  5. is_private changed to: "0"
  6. login: "pooryorick"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "5d4b6538b2536427c4ee4dd0ec7495de74567d31"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "- New Builtin Commands"
  14. title changed to: "lsearch -index requires nested items to exist"
  15. type changed to: "Bug"