curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: documenting command line options

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 14 Nov 2016 07:52:49 +0100 (CET)

On Mon, 14 Nov 2016, Alex Bligh wrote:

> 1. Out of interest, why is the suffix ".d" when that normally means
> "directory of things to be included"?

That was mostly random. I'm totally fine if someone wants to suggest a better
or more suitable suffix. I just tried to find one that my emacs didn't
consider to be some special format automatically and one that doesn't mislead
you. Like .doc, .1, .txt all to me seemed to suggest something this isn't. I
didn't spend a lot of time on picking one.

Why a suffix at all you may ask? I just wanted the script to be able to find
all the command line files automatically while there still being other files
in the same directory.

> 2. How do you get nroff type formatting in? e.g. in
> https://github.com/curl/curl/blob/master/docs/cmdline-opts/cookie.d how do
> you make it format '--cookie' in the text as an option rather than just
> plain text?

That's one of the upsides with this system. It will index all options
automatically and when outputting boxy text, it detects uses of known options
and replaces them with the correct nroff markup version. Makes the body text
easier to read and write and makes it hard to forget marking nroff (which
otherwise itself leads to missing links in the web version).

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ:        https://curl.haxx.se/docs/faq.html
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-11-14