1
0
forked from Alepha/Alepha
Commit Graph

11 Commits

Author SHA1 Message Date
95e6f1ac04 Online documentation for single-letter options.
It's mostly worked out, but there's a few odd corner cases,
especially around the auto-gen of negation options.  It also
got me to start thinking about "is a required negatable option
still required of its negation?"  Similar questions revolve
around requiring such options.

I'm punting on these for now, but I think it makes sense to
perhaps make those incompatible with such domains.  Or to treat
the two options as a shared-fate unit.  But is `-O -o -O -o` a
violation of exclusivity?  If we wind up returning to the default
state, have we actually passed that option, with respect to
"requirement"?  I have to think about that some more.

A commit message isn't the best place to capture this, but I
didn't want to lose this thought.
2025-09-06 02:36:17 -04:00
e41198c294 Initial draft of how short options work.
I went with expansion here, as it was easier to implement,
given the complexities of how the options parsing code works.

Rather than try to maintain state machines and parsing for both
forms of argument, we can transform the short options into the
long form options.  This, then, might lead to some issues when
the code is expanded to handle arguments to those options.
I'll probably just add a state tracking bit to that parameter to
say that it was expanded from a specific short form.

It might be worth it to permit a short form to expand to a long
form _with_ specific hardcoded option.  This gets into defaults,
which might be the better way to underpin that.

For expanding these into the automatic help documentation, the
Long options (the main option definition struct) should maintain
a list of the short forms that it supports.

I also need to add a neat syntax.  Something like:

```
-'o'_option <= --"long-option"_option
```

It might be beneficial to auto generate something like:

```
-'O'_option <= --"no-long-option"_option
```

for boolean toggles.  Should it always be so?  Maybe an extra
sigil to allow both?
2025-09-06 01:22:53 -04:00
083a58dc99 The --help output got mangled. This fixes it. 2024-04-04 22:26:29 -04:00
83034c501f AutoRAII based stream adaptors. 2024-04-03 16:28:55 -04:00
d8689b85e8 Make the underlying streambuf private in stacks. 2024-04-03 15:01:52 -04:00
8250680e6c Modernize some of how program options emits help.
Alepha IOStreams supports adaptors for most of what used to be
temporary string functions.
2024-04-03 14:24:03 -04:00
4682fe3ffb Consolidate the StaticValue implementations. 2023-11-12 05:23:20 -05:00
b21e8818e7 Make a portable hook for getting program name. 2023-11-10 22:51:03 -05:00
25b9cf0ac8 More hydrogenation. 2023-11-08 04:42:17 -05:00
d1157cabf7 Start the C++23 adoption. 2023-11-07 05:30:50 -05:00
7097e6ae65 renames 2023-10-29 20:37:52 -04:00