delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/21/12:12:49

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Matthew Woehlke <mw_triad AT users DOT sourceforge DOT net>
Subject: Re: How to uniformly point to the root of a drive?
Date: Mon, 21 May 2007 11:11:32 -0500
Lines: 38
Message-ID: <f2sgbl$v85$1@sea.gmane.org>
References: <20070521041542 DOT GA23520 AT ednor DOT casa DOT cgf DOT cx> <BAY125-F20C45F9AA3619BFE68C8CDB5370 AT phx DOT gbl> <20070521142944 DOT GC6003 AT calimero DOT vinschen DOT de> <004301c79bb6$c8c70db0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20070521152515 DOT GD6003 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.0
In-Reply-To: <20070521152515.GD6003@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Corinna Vinschen wrote:
> On May 21 15:46, Dave Korn wrote:
>> On 21 May 2007 15:30, Corinna Vinschen wrote:
>>> so we can change cygcheck to handle this unambiguously.
>>   cygpath.
> 
> Right.  Unfortunately I just found that -m is sometimes used as a modifier
> (-dm makes sense) and sometimes standalone (-m instead of -w).
> 
> Actually it seems to be better to disallow only combinations which
> explicitely don't make sense, but to allow any combination which make
> *some* sort of sense.  The rules would be, afaics
> 
> - Don't allow -d with -l.
> - Allow any other mix of -d, -l, -m and -w.
> - Don't allow -u with any of the above flags.

If you mean that '-[wm]+' (rexexpr syntax) means '-m', that's what I 
thought made the most sense. IOW '-w' defaults to '\' but does not 
override '-m', and '-m' implies '-w' unless otherwise specified. 
Actually I see no problem with '-um', it's just a no-op because '-u' 
means '-m' anyway. Even '-lu' and '-su' are actually valid...

So...

'-w' and '-u' are mutually exclusive.
'-s', '-l', '-m' imply '-w' unless '-u' used
'-d' is an alias for '-ws'

Examples:
cygpath -su 'c:\program files'
--> /cygdrive/c/PROGRA~1 # valid path!
cygpath -dm 'c:\program files'
--> C:/PROGRA~1

-- 
Matthew
When in doubt, duct tape!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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