0.5.5 / 2024-04-08

CommandKit::Interactive

  • Ensure that the interactive prompt is re-printed when no input is entered and input is required from the user.

CommandKit::Options

  • Do not pass an Array of Regexp captures for an option's value Regexp type into an option's block, if the option's block only accepts one argument. Instead, only pass the option's value as a String.

0.5.4 / 2024-03-14

CommandKit::Options

  • Fixed a bug where Array option values were only setting the option's value to the first element of the parsed Array value.

0.5.3 / 2024-03-12

CommandKit::Interactive

0.5.2 / 2024-03-07

CommandKit::Options

  • Fixed the --help output for options with multi-line descriptions (ex: desc: ['Line 1', 'Line 2', ...]).

0.5.1 / 2024-01-24

  • Switched to using require_relative to improve load-times.
  • Added # frozen_string_literal: true to all files.

0.5.0 / 2024-01-04

0.4.1 / 2024-01-03

  • Added more examples of how to define sub-commands and sub-sub-commands.

CommandKit::Options::Parser

  • Do not override the command's usage if it's already been set.

CommandKit::Printing::Tables

  • Format the table output as UTF-8 to allow UTF-8 data in the formatted table.

0.4.0 / 2022-11-11

CommandKit::Colors

  • Support disabling ANSI color output if the NO_COLOR environment variable is set.

CommandKit::Options

  • Correct the option usage for long option flags that have optional values (ex: --longopt[=VALUE]).

0.3.0 / 2021-12-26

CommandKit::FileUtils

CommandKit::Colors

ComandKit::Options

  • Allow grouping options into categories:

    option :opt1, category: 'Foo Options', desc: 'Option 1'

    option :opt2, category: 'Foo Options', desc: 'Option 1'

  • Allow options to have multi-line descriptions:

    option :opt1, short: '-o', desc: [ 'line1', 'line2', '...' ]

CommandKit::Arguments

  • Allow arguments to have multi-line descriptions:

    argument :arg1, desc: [ 'line1', 'line2', '...' ]

CommandKit::ProgramName

0.2.2 / 2021-12-26

CommandKit::Help::Man

0.2.1 / 2021-11-16

CommandKit::Printing

  • Auto-detect whether #command_name is available, and if so, prepend the command name to all error messages.

CommandKit::Help::Man

  • Expand the path given to man_dir.
  • If man_dir is not set, fallback to regular --help output.

CommandKit::Arguments

CommandKit::Options

CommandKit::Options::OptionValue

CommandKit::Command

CommandKit::Commands

  • Define the COMMAND and ARGS arguments.
  • Correctly duplicate the env (which can be either ENV or a Hash) to work on ruby-3.1.0-preview1.
  • Print command aliases that were set explicitly (ex: command_aliases['rm'] = 'remove') in CommandKit::Commands#help.
  • Print help and exit with status 1 if no command is given. This matches the behavior of the git command.

CommandKit::Commands::AutoLoad

  • Ensure that any explicit command aliases are added to the command's command_aliases.

0.2.0 / 2021-08-31

0.1.0 / 2021-07-16