Menu

#9 Avoid doubling / on Windows when sourcing dotfiles

open-postponed
nobody
None
1
2001-03-28
2000-11-03
Graham Reed
No

Discussion

  • Graham Reed

    Graham Reed - 2000-11-03

    None

     
  • Andrey Borzenkov

    I amd curious, where _WIN32 comes from. Is it for 3.0.x series Win32 build? Or did you manage to compile 3.1.x for Win32?

     
  • Bart Schaefer

    Bart Schaefer - 2001-03-28

    Logged In: YES
    user_id=22647

    This is a special case of a general problem for which there
    is as yet no solution. The right fix for this particular
    case is to avoid setting HOME=/ in the environment, not to
    add special-case C code.

    (It's possible that this patch applies to Amol Deshpande's
    Win32 port of zsh. That would explain the use of the _WIN32
    constant.)

     
  • Bart Schaefer

    Bart Schaefer - 2001-03-28
    • priority: 5 --> 1
    • status: open --> open-postponed
     
  • Graham Reed

    Graham Reed - 2001-03-28

    Logged In: YES
    user_id=41344

    Yes, I agree, HOME=/ is a bad idea. However, Windows turns
    what is merly a cosmetic annoyance on UNIX into a serious
    problem, as "//" means something very different from "/".

    The ZSH version I used is just the stock 3.1.9 code under
    Cygwin. _WIN32 is defined automatically by all compilers on
    all Win32 platforms, just like __unix.

    To be honest, I don't really care if zsh never incorporates
    this fix, since it is a kludge for an OS-specific problem
    that manifests with a bad configuration. But I would like
    to see it remain visible, either here on SourceForge or in a
    "so-you-have-to-deal-with-Windows" file with gotchas and
    caveats and limitations and all that good stuff.

     
  • Bart Schaefer

    Bart Schaefer - 2001-03-28

    Logged In: YES
    user_id=22647

    I left the status as "open" so that the patch would remain
    visible.

    Current practice for zsh is to use __CYGWIN__ rather than
    _WIN32, which is where the questions about your use of
    _WIN32 came from.

     
  • Andrey Borzenkov

    Logged In: YES
    user_id=64334

    2greed: current Cygwin does not set _WIN32 anymore (unless
    you explicitly asks it to do so that Zsh does not do). The
    problem with $HOME=/ is general enough, if you browse
    Cygwin list you'll see countless advises to NOT set HOME=/.
    Every peace of software had problems with it.

    It does not mean, I'm against this patch. I just like to
    point out that none of my login scripts will work even with
    this patch because they contain $HOME/foo.