Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 82cb77098b71781105e54b5dbee0ff4bf87937f0
Ticket: 1591407fffffffffffffffffffffffffffffffff
anomaly in [file tail] under ~ expansion
User & Date: coldstore on 2006-11-07 06:26:49
Changes

  1. icomment:
    Logged In: YES 
    user_id=19214
    
    I believe the correct behaviour would be to return "~fred"
    to [file tail ~fred] when the user fred doesn't exist.
    
    I note another anomaly:  [file tail ~colin/wilma] returns
    "wilma" and [file tail ~colin] returns "colin" (being the
    tail of the expanded path.)
    
    It seems (from experiment, not looking at the source) that
    the expansion is intentionally performed iff the result of
    [file tail] yields a ~-form.  This is unexpected behavior,
    and inconsistent with such things as [file tail ~fred/..]
    and so, I believe, it should be removed as surprising and
    not particularly useful.
    
    Most people, I imagine, use [file tail] as a shorthand for
    [lindex [file split] end].  If they wanted expansion, they
    could use [file normalize].
    
    
  2. login: "coldstore"
  3. mimetype: "text/plain"
  4. username: "coldstore"