Skip to content
Tcl Source Code History Of Ticket 8014353dcb
Login

History Of Ticket 8014353dcb

Artifacts Associated With Ticket 8014353dcb

  1. Ticket change [4fe360e36d] (rid 253069) by apnadkarni on 2026-04-26 11:04:56:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      As the transcript below shows, appending to an environment variable using the lowercase name when originally stored as uppercase overwrites instead of appending. However, 
      
      
      ```
      c:\src\tcltk\wip\tcl\win>set USERNAME
      USERNAME=ashok
      
      c:\src\tcltk\wip\tcl\win>tclsh
      % set env(USERNAME)
      ashok
      % append env(username) nadkarni
      nadkarni     <--------------- OVERWRITE
      % set env(USERNAME)
      nadkarni
      % exit
      
      c:\src\tcltk\wip\tcl\win>tclsh
      % set env(USERNAME)
      ashok
      % append env(USERNAME) nadkarni
      ashoknadkarni     <---------------OK
      % set env(USERNAME)
      ashoknadkarni
      % exit
      ```
      
      Curiously, if the value is read previously in lowercase before appending, it all works as expected.
      
      ```
      c:\src\tcltk\wip\tcl\doc>tclsh
      % set env(username)    <---------------- read using lowercase
      ashok
      % append env(username) nadkarni
      ashoknadkarni          <---------------- then works as expected
      % set env(USERNAME)
      ashoknadkarni
      ```
      
    5. foundin initialized to: "9.0"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "08. Environment Variables"
    15. title initialized to: "append env(varname) overwrites existing value"
    16. type initialized to: "Bug"
  2. Ticket change [57477a23cd] (rid 253070) by apnadkarni on 2026-04-26 11:12:37:

    1. icomment:
      The `env` manpage states environment variable names `PATH` and `COMSPEC` are automatically converted to uppercase. It does not say anything about other environment variables. However,
      
      - the reported behavior is also seen with `PATH`
      
      - even if variables other than the above two are case-sensitive, there is still an inconsistency because in that case setting `username` should not affect `USERNAME`.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  3. Ticket change [524d90df5a] (rid 253071) by apnadkarni on 2026-04-26 11:19:48:

    1. foundin changed to: "8.6"
    2. icomment: "Present in 8.6 as well"
    3. login: "apnadkarni"
    4. mimetype: "text/plain"
  4. Ticket change [e3657f9aff] (rid 253737) by apnadkarni on 2026-05-21 13:43:48:

    1. icomment:
      As per ticket [3057639fff], issues around append/lappend, compiled/uncompiled behavior seem to have been around forever and still exist. This ticket might be related.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-fossil-plain"