Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

cli: public commands API #232

Merged
merged 20 commits into from
Aug 1, 2023
Merged

cli: public commands API #232

merged 20 commits into from
Aug 1, 2023

Commits on May 31, 2023

  1. Configuration menu
    Copy the full SHA
    ca3f3d7 View commit details
    Browse the repository at this point in the history
  2. Introduce cli.AddHelpCategory()

    anpep committed May 31, 2023
    Configuration menu
    Copy the full SHA
    b65bd90 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. Minor fixes

    anpep committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    8aa94a8 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. cli: remove AddHelpCategory and improve AddCommand

     * AddHelpCategory() was removed in favor of an exported
       HelpCategories global.
     * AddCommand() now accepts a CmdInfo struct as its sole
       argument.
    anpep committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    7b9c17c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e3bde9 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. cli: improve CmdInfo

     * Removed unused struct members such as Aliases and Hidden.
     * Replace the Extra function with PassAfterNonOption, as this
       is the only internal flags.Command option that justified its
       need.
     * Rename OptDesc/ArgDesc for clarity.
     * Document the public API.
    anpep committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    f8b585e View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. cli: minor changes to CmdInfo

     * CmdInfo.{ShortHelp,LongHelp} -> CmdInfo.{Summary,Description}
     * CmdInfo.PositionalArgs -> CmdInfo.ArgumentsHelp
     * PositionalArg.{Name,ShortHelp} ->
           ArgumentHelp.{Placeholder,Help}
    anpep committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    4267955 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Configuration menu
    Copy the full SHA
    c1669b0 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. cli: merge args/opts help

     * CmdInfo.ArgsHelp now contains the help text for short, long options
       and positional arguments, using a new convention.
     * func init() on all commands is now moved to the top of the source
       file, and help strings no longer are globals, for better readability
       and for immediate information about the command when reading from
       the top.
     * Remove debug command (which duplicated Parser() functionality)
     * Refactor Parser()
     * Still needs fix: broken workaround that has been removed, which
       previously overrode the usage string from the parser so that
       help manuals don't introduce the [<command>-OPTIONS] string on
       the usage line. This is a bug in both the CLI help and manpage
       generation code in go-flags, and will be tackled in a future
       PR in canonical/go-flags. See canonical/go-flags#4
    anpep committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    8ac498e View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. cli: minor changes

    anpep committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    d9d63d1 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. cli: minor fixes

     * Strip some dead code
     * Minor corrections to keep staticcheck happy.
    anpep committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    bc316ad View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Configuration menu
    Copy the full SHA
    6a34f53 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. cli: minor changes

    anpep committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    fbb805c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    908a4df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    50fd3dd View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. cli: tweak flag regexp

    The following flags will pass: `-a`, `--long-flag`, `--b`, `--this-is-a-flag`;
    the following flags won't: `---`, `---c`, `--quasi--valid`
    anpep committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8bc71be View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. cli: minor changes

    anpep committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    8417216 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Configuration menu
    Copy the full SHA
    2e66374 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Configuration menu
    Copy the full SHA
    34e9f81 View commit details
    Browse the repository at this point in the history
  2. Fix imports

    anpep committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    472aee9 View commit details
    Browse the repository at this point in the history