delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/04/04/17:59:59

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <E94FF01DFF6CD31186F4080009DC361501CEA1D9@nttwr2.tower.bldgs.butlermfg.org>
From: "Parker, Ron" <rdparker AT butlermfg DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: RE: New output from mount.exe
Date: Wed, 4 Apr 2001 15:41:20 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

> From: Earnie Boyd [mailto:earnie_boyd AT yahoo DOT com]

> Christopher Faylor wrote:
> > 
> > On Wed, Apr 04, 2001 at 10:32:49AM +0900, Kazuhiro Fujieda wrote:

> > >Would you like to go a step further?
> > >
> > >Corinna's idea "just printing slashes" can reduce chances for
> > >newbies to fail to escape backslashes on creating a new entry
> > >with the `mount' command. This would be fine.
> > 
> > It would also lie to the user about what was happening in the Cygwin
> > internals.  Cygwin stores these paths as c:\foo not c:/foo. 
>  I don't see
> > any reason to mislead anyone about what Cygwin is really doing.
> > 
> 
> I don't see that change would mislead anyone.  I also don't see why it
> is stored in the mount table with back slashes.  It would be 
> beneficial
> to everyone to see it as forward slashes so as not to make the obvious
> error that this discussion is trying to avoid.  This change will cut
> down on the mail to the Cygwin list and we all would very much
> appreciate that.

While I understand the desire to have all paths displayed with slashes,
where does the argument end? Should we escape spaces that may occur in the
mount names?  Should we quote them?  How many times should we escape them?
Once for the shell? Twice for a shell plus the subprocess that the path is
passed to?  I have hashed this one over and over in my own mind on many
occasions because I often parse the output of programs like mount to use as
input into scripts or other programs.

I believe that the backslashes used for c:\foo and similar entries in the
mount table emphasize that it is a Windows style path and not a cygwin path.
Outputting c:/foo could just as easily lead to the naive user inferring that
c:/foo is a legal cygwin path.

I think we should retain the simplicity of the change that Chris made.  

If more extensive modifications are planned for the future, then we can
discuss other changes, like escaping spaces in the mount location and so
forth.  Alternatively, if you feel strongly enough about a change, submit a
patch (tm).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019