Re: file command bug on windows



Don Porter <dgporter@xxxxxxxxxxx> writes:

Well, it may be documented, it may be useful, but it is broken. A
leading tilde is just another symbol on Windows, and it is not different
from an 'A'. If tcl treats it on a specific way, Tcl is broken.

You should realize that tilde is also 'just another symbol' on UNIX as
well. It is just that *tradionally* it is a shorthand (in sh, csh,
bash, etc.) for a users home directory as well, and this shorthand
usage is also used in tclsh/wish, as well as other. The 'trick' of
preceding a leading tilde with a directory spec (eg "./") to suppress
the home directory substitution works for UNIX as well. Under UNIX
"./~foo" is a ligit filename and is a filename that starts with the
literal character '~'. A bit awkward do deal with from a command
shell, but not any worse than a filename starting with a dash.

I have news for you: Windows is not Unix. ...

The time for this argument was ~1996 when Tcl was first ported
to Windows.

Think of it as if fixing a long-standing bug. At least for Windows.

[snip]

--
Oscar
.



Relevant Pages

  • Re: Tilde expansion on (Windows)files?
    ... working on a storage optimization system I realized, ... What does this mean, which filename is searched? ... If it works on Windows, why doesn't it find the file? ... E.g. the tilde expansion only makes sense in a user specific environment ...
    (comp.lang.tcl)
  • Re: Tilde expansion on (Windows)files?
    ... working on a storage optimization system I realized, ... that a tilde in a filename makes problems: ... If it works on Windows, why doesn't it find the file? ... E.g. the tilde expansion only makes sense in a user specific environment ...
    (comp.lang.tcl)
  • Tilde expansion on (Windows)files?
    ... working on a storage optimization system I realized, ... What does this mean, which filename is searched? ... If it works on Windows, why doesn't it find the file? ... How can this file be handled in Tcl? ...
    (comp.lang.tcl)
  • Re: file command bug on windows
    ... as documented and is useful in windows as well as in Unix. ... The manual page for `filename` on Tcl 8.4.13 says this: ... The Macintosh and Windows platforms do not support tilde substitution ...
    (comp.lang.tcl)
  • Re: file command bug on windows
    ... If tcl treats it on a specific way, ... You should realize that tilde is also 'just another symbol' on UNIX as ... Windows is not Unix. ...
    (comp.lang.tcl)