X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=pS
	88MuBRu5H2dvU0nDlRocp5ITegL+ixfRkydSGbrJOFhM3u1rkYiXiKGj/taaMoNI
	6yaneb1vdw1W8I6fglYbNYFw7QpcmwrZ8i+kgIDzE50TGrPFVTjUxiBSMW8/AIyt
	gGf9+q7r36YNLYOrRUMDl3JNRB+4df1WWqTK4RlQw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=EIIIcMrS
	E4xviKDF7gN2X9DYXvg=; b=BLI4iewnGEuhNJ0gpxY0LhqWONJyyLYug5OzrH3C
	gvObMxt3fmsiVKyzcXVDKjQdtMipvNJodIgFCwJ4LWUvHkFTOjiDIq0Y/+wrApbP
	mMMpT/7MU6SDfFVR5vZNEujIXl6RD/gAMedpWmdWVrkibBc/pzwLVmUac7xabtOZ
	Gvk=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ig0-f179.google.com
MIME-Version: 1.0
X-Received: by 10.42.188.70 with SMTP id cz6mr202369icb.19.1412204084597; Wed, 01 Oct 2014 15:54:44 -0700 (PDT)
In-Reply-To: <542C854D.3050001@jhmg.net>
References: <loom.20141001T235147-60@post.gmane.org>	<542C854D.3050001@jhmg.net>
Date: Wed, 1 Oct 2014 16:54:44 -0600
Message-ID: <CAFWoy7EuG5vr2=QvEL5Js5Zg8rNfmLbHUYOrmnEdZsJ2vGFSnQ@mail.gmail.com>
Subject: Re: Direct/efficient way to chop off trailing \n
From: Keith Christian <keith1christian@gmail.com>
To: jhg@acm.org, cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

This function echoes the present directory to the clipboard, so that I
don't have to enter the path manually.

I use this function in a script that sources when a bash shell is
started.  Also echoes the path to the terminal for verification.
Handy for pasting directly into windows file dialogs.

function xx() {
        DESCRIPTION="Copy the Windows drive/path/filename to the clipboard"
        cygpath -w "`pwd`"|tr -d "\012"|sed -e
's/$/\\/'|putclip;echo;getclip;echo
}

On Wed, Oct 1, 2014 at 4:50 PM, Jim Garrison <jhg@jhmg.net> wrote:
> On 10/1/2014 2:52 PM, Paul.Domaskis wrote:
>> Running bash in a Windows environment, I often find the need to
>> generate a full Windows path to a file so that I can access the file
>> from a Windows app.
> [snip]
>>... but it does remove the trailing \n which chokes up
>> Windows.
>
> Sounds like cygpath needs a "-n" option which eliminates the
> trailing newline.
>
>
> --
> Jim Garrison (jhg@acm.org)
> PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88
>
> --
> 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
>

--
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

