Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've seen many command line tools that take a "--" argument. For example:

gem install mysql -- —–with-mysql-config=/usr/local/mysql/bin/mysql_config

What does it stand for? Does it have a special meaning?

share|improve this question
This is not a duplicate, I'm asking a different question here. I'm wondering about the doubledash with no argument name following. – Olivier Lalonde Oct 20 '12 at 15:34
Which is what I said, to the best of my comprehension. – zmode Oct 20 '12 at 19:28
Right, my bad. I was referring to the duplicate link created by @Sathya. – Olivier Lalonde Oct 20 '12 at 20:22
I've reopened it, @zmode. My apologies. – Sathya Oct 21 '12 at 4:52

It means the tool should stop treating the dash as an option character. For example, suppose you want to search for a dash character in a file:

grep -- - file

In your example the -- is necessary because the gem tool is calling another tool, which also uses dash-prefixed options.

share|improve this answer

This is common practice when one program, that takes long options, needs to call another program that also takes long options. It signals the first program to stop parsing options, and pass the rest on, unchanged, to the subprocess that it invokes.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .