X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_YG,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Thu, 10 Feb 2011 15:35:53 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Accessing folders elsewhere than C:\cygwin
Message-ID: <20110210203553.GB32475@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4D52A7DD.7080208@bonhard.uklinux.net> <4D52B4D3.2040102@sbcglobal.net> <20110209163858.GJ16194@calimero.vinschen.de> <0105D5C1E0353146B1B222348B0411A209C0F073A4@NIHMLBX02.nih.gov> <4D541D35.3020901@redhat.com> <OF248AECF7.EB384F53-ON85257833.006FBBCF-85257833.007007D2@lnotes-gw.ent.nwie.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <OF248AECF7.EB384F53-ON85257833.006FBBCF-85257833.007007D2@lnotes-gw.ent.nwie.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, Feb 10, 2011 at 03:23:38PM -0500, RISINGP1@nationwide.com wrote:
>Eric wrote on 02/10/2011 12:15:33 PM:
>
>> On 02/10/2011 10:13 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>> > Might the ability to identify cygwin's root be a good
>> > thing to add to cygpath?
>> 
>> And what's so hard about 'cygpath -w /'?
>> 
>> > Under "System information", one could have an option
>> > 
>> >   -R, --root    output cygwin root directory
>> > 
>> > where
>> > 
>> > $ cygpath -Rw
>> > C:\cygwin
>> 
>> Trading / for -R doesn't justify the bloat and burning another short
>> option character, in my opinion.
>
>If you need it ofetn enough, here is a simple script for displaying the 
>cygwin root:
>
>case $1 in
>    -w)
>        mount | grep " / " | cut -d" " -f1 | sed 's:/:\\:g'
>        ;;
>    -u)
>        DRIVE=$(mount | grep " / " | cut -d":" -f1):
>        echo $(mount | grep "^$DRIVE " | \
>        cut -d" " -f3)$(mount | grep " / " | cut -d" " -f1) | \
>        sed 's/'$DRIVE'//'
>        ;;
>    *)
>        echo "Please specify -w (Windows) or -u (Unix)"
>        ;;
>esac

Why would we need a simple script to display the cygwin root when
"cygpath -w /" works fine?

cgf

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

