caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Wang <lists@philippewang.info>
To: Andrew Warshaver <awarshaver@janestcapital.com>,
	ocaml ml <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlbuild single quotes causing trouble
Date: Fri, 22 Jun 2007 22:38:29 +0200	[thread overview]
Message-ID: <467C3345.9060303@philippewang.info> (raw)
In-Reply-To: <467C0ADA.7060008@janestcapital.com>

Andrew Warshaver wrote:
>
> Alain Frisch wrote:
>> Andrew Warshaver wrote:
>>> it works just fine.  I also discovered that if I don't use the ~ 
>>> abbrev.
>>> then everything is happy (although this took me a long time to
>>> discover!).
>>
>> The shell is responsible to expand ~ before calling the program. If you
>> quote it, it won't be expanded; this is normal. When you put ~ on
>> ocamlbuild's command line, as in "-I,~/multi-oc/lib" it is not expanded
>> either (~ is interpreted only at the beginning of a word on the command
>> line).
>>
> Thanks for the explanation.  But is there any reason that ocamlbuild 
> has to add the single quotes when transferring the argument to 
> ocamlc?  And, if it didn't, would it then work appropriately?
The quotes are necessary to consider that the block is a single argument.
If you want to remove those quotes, then you have to "guess" what the 
user meant (i.e. guessing where the quotes would have been if they were 
there).
In some cases, it's impossible to guess with a 100% accuracy...

Well, I suggest you to use $HOME instead of ~.
(then you have to use double quotes instead of quotes, so that the shell 
expands $HOME, as the variables inside simple quotes don't expand -- 
well I hope you are not using a too weird shell ;-)


--
  Philippe Wang
    mail[at]philippewang.info


      reply	other threads:[~2007-06-22 20:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-22 14:53 Andrew Warshaver
2007-06-22 17:10 ` [Caml-list] " Alain Frisch
2007-06-22 17:46   ` Andrew Warshaver
2007-06-22 20:38     ` Philippe Wang [this message]

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=467C3345.9060303@philippewang.info \
    --to=lists@philippewang.info \
    --cc=awarshaver@janestcapital.com \
    --cc=caml-list@inria.fr \
    /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 NNTP newsgroup(s).