From: Sam Edge <sam.edge.cygwin@gmx.com>
To: cygwin@cygwin.com
Subject: Re: cygpath and star character
Date: Thu, 15 Jul 2021 07:18:30 +0100 [thread overview]
Message-ID: <9eac213b-9ca7-0a60-fc80-a963b34091e7@gmx.com> (raw)
In-Reply-To: <435f5a07-98cc-ef48-2188-6289d7a9dd7f@gmail.com>
On 15/07/2021 00:07, Tomas Jura via Cygwin wrote:
> Hi
>
> My use case is building the CLASSPATH environment variable for java.
> Like:
>
> export CLASSPATH="${CLASSPATH}${PATH_SEPARATOR}$(cygpath -w
> 'my/java/jar/directory/*' )"
>
> CLASSPATH can contain the star character at the end on Windows.
> Example C:\Apps\java\lib\* , which means something different then just
> C:\Apps\java\lib, ie. the star is necessary there.
>
> Tomas
>
>
So do:
export CLASSPATH="${CLASSPATH}${PATH_SEPARATOR}$(cygpath -w
'my/java/jar/directory')\*"
If you pass the asterisk to cygpath it will naturally consider it to be
a character in a pathname and give you the equivalent Windows path that
Cygwin would construct using the open() syscall. This is cygpath's
purpose, after all!
--
Sam Edge
next prev parent reply other threads:[~2021-07-15 6:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 8:10 Tomas Jura
2021-07-14 19:26 ` Ken Brown
2021-07-14 23:07 ` Tomas Jura
2021-07-15 6:18 ` Sam Edge [this message]
2021-07-15 9:11 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9eac213b-9ca7-0a60-fc80-a963b34091e7@gmx.com \
--to=sam.edge.cygwin@gmx.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).