View Single Post
Old 03-21-2020, 05:43 PM   #9
sjfan
Addict
sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.
 
Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
Quote:
Originally Posted by ShellShock View Post
Is double hyphen a Unix convention?
It's a GNU convention (and it precedes bash), and GNU's Not Unix, so it's not really Unix. But it's from the Unix-adjacent world.

Unix commands commonly had single-character flags: you might have "-h" for "help", "-l" for "list", -p for "print", and -e for "error". You can use multiple flags after a single dash, so "-lp" is the same as "-l -p".

GNU introduced long names—slower to type, but easier to remember. But when they did, there was a potential clash: is "-help" the same as "-h -e -l -p", or is it the single "help" option? To avoid this clash, they introduced the convention of using two dashes with a long option name. So "-help" remains "-h -e -l -p", while "--help" is the "help" long option.

This is why you get the original error message above: calibre says "error: no such option: -g" because it begins parsing "-generate-recently-added", sees a single dash, and interprets it as '-g -e -n -e -r -a....'.

http://www.catb.org/~esr/writings/ta...l/ch10s05.html has some discussion.
sjfan is offline   Reply With Quote