X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Re: stupid spaces in environment vars Date: Thu, 8 Feb 2007 15:57:47 -0500 Message-ID: <31DDB7BE4BF41D4888D41709C476B657068AA9A9@NIHCESMLBX5.nih.gov> In-Reply-To: A<88kms217e9imfeblbgurjc4e5c09b6ub2v@4ax.com> References: <45CA8AAF DOT 9050107 AT cygwin DOT com> <533213 DOT 63517 DOT qm AT web58615 DOT mail DOT re3 DOT yahoo DOT com> A<88kms217e9imfeblbgurjc4e5c09b6ub2v AT 4ax DOT com> From: "Buchbinder, Barry \(NIH/NIAID\) [E]" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l18Kw0qt016182 Andrew Schulman wrote on Thursday, February 08, 2007 11:36 AM: >> BAD: >> alias cdp=cd\ "$USERPROFILE" >> +alias 'cdp=cd C:\Documents and Settings\me' >> >> alias cdp="cd $USERPROFILE" >> +alias 'cdp=cd C:\Documents and Settings\me' >> >> GOOD: >> alias cdp="cd \"$USERPROFILE\"" >> + alias 'cdp=cd "C:\Documents and Settings\me"' >> >> alias cdp='cd "$USERPROFILE"' >> + alias 'cdp=cd "$USERPROFILE"' > > To avoid one layer of quoting, how about > > function cdp () { cd "$USERPROFILE"; } What about the following? /c> cd "$(cygpath -u "${USERPROFILE}")" Would it add anything to do this with cygpath, which already gives some system paths? /c> cygpath --help [snip] System information: -A, --allusers use `All Users' instead of current user for -D, -P -D, --desktop output `Desktop' directory and exit -H, --homeroot output `Profiles' directory (home root) and exit -P, --smprograms output Start Menu `Programs' directory and exit -S, --sysdir output system directory and exit -W, --windir output `Windows' directory and exit Other options: -f, --file FILE read FILE for input; use - to read from STDIN [snip] [snip] Might it be useful to add another option: -e, --environment VARIABLE convert path in an environmental variable so that one could do /c> cd "$(cygpath -u -e USERPROFILE)" I know PTC, but I'm not a programmer. As always much gratitude to everyone who is a programmer and maintains or otherwise contributes to cygwin! - Barry - Disclaimer: Statements made herein are not made on behalf of NIAID. -- 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/