Charles Marcus wrote:
Richard Fish wrote:
On 1/18/06, Charles Marcus <[EMAIL PROTECTED]> wrote:
This may be the ultimate dumb question, but no amount of googling could
satisfy my ignorance...
Is there any difference? If not, why are the double hyphens almost
always specified?
-- is the GNU getopt syntax for long options. For normal GNU programs:
--opt is processed as a single option ("opt")
-opt is processed as 6 options ('o', 'p', and 't').
--sync is correct. -sync is wrong and generates an error.
Ahem... not for me it didn't... thats why I asked - wondered if I may
have hosed anything (can't imagine that such a minor, easy-to-make typo
would caus ebad things to happen, though).
Thanks for the detailed explanation, though... now I at least know the
differences.
Now, why did it not generate an error for me, I wonder?
Maybe you're thinking of emerge sync:
$ emerge -sync
!!! Error: -y is an invalid short action or option.
dell src # emerge sync
>>> starting rsync with rsync://129.21.154.146/gentoo-portage...
emerge sync does the same thing as emerge --sync, but actually it's a
bad habit to get into, because the default behavior for portage is to
install its non-flag arguments. The implication is that 'emerge sync'
should install a package named 'sync'.
Of course, that doesn't happen. emerge (sync|info|metadata|...) all
don't install packages. If you want to install app-vim/info, you
have to fully specify its name: emerge app-vim/info.
But you can never tell when such behavior will change. :-)
--
gentoo-user@gentoo.org mailing list