Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix writing INI and man pages for subcommands #296

Merged
merged 2 commits into from
Jul 11, 2020

Conversation

rupertchen
Copy link
Contributor

This PR addresses two issues pertaining to subcommands: writing the INI and writing the man pages.

The work is split across two commits. The first commit addresses an issue where INI sections for subcommands were written as [sub.] instead of [parent.sub]. The second commit addresses an issue with usage text in man pages where commands only included the usage text of their immediate parent instead of a complete usage starting from the root.

Whereas a 'bar' subcommand under 'foo' should have the section name
'foo.bar', it was being written as 'bar.'.
Previously, the usage text of a sub command on the man page would only
include the direct parent command's name. A `foo` utility with `bar`
command and `baz` subcommand would give `baz`s usage as

```
Usage: bar [OPTIONS] baz [baz-OPTIONS]
```

instead of

```
Usage: foo [OPTIONS] bar [bar-OPTIONS] baz [baz-OPTIONS]
```
@rupertchen
Copy link
Contributor Author

Addressed gofmt issue with fixup of 97ea3ef.

@rupertchen
Copy link
Contributor Author

@jessevdk , are you still maintaining this project?

@rupertchen
Copy link
Contributor Author

@jessevdk , ping

Copy link
Owner

@jessevdk jessevdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome fix, thanks!

@jessevdk jessevdk merged commit 28ec126 into jessevdk:master Jul 11, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants