- add the
glint.map_command
function
- updated gleam stdlib to >= 0.43
- fixed deprecation warnings on latest stdlib version
- use punning internally, requires gleam >= 1.4
- updated gleam stdlib to >=0.39
- replace calls to
dict.update
withdict.upsert
- replaced the pipe-based command builder API with a
use
-based one that provides better ergonomics - removal of the
glint/flag
module and named flag getter functions - flags are now handled directly by the
glint
module - constraints are now handled by the
glint/constraint
module - many functions in the
glint
module have had their names somewhat adjusted - help text formatting is now consistently aligned and more legible
- relax gleam stdlib version constraint
- support for group flags at a given path
- remove unused function import to silence compiler warnings
- support gleam 1.0.0
glint.CommandResult(a)
is now aResult(Out(a), String)
instead of aResult(Out(a),Snag)
- command exectution failures due to things like invalid flags or too few args now print help text for the current command
- fix help text formatting for commands that do not include arguments
- remove named args from help text usage
- change
glint.count_args
toglint.unnamed_args
, behaviour changes for this function to explicitly only check the number of unnamed arguments - remove notes section from usage text
- support gleam >=0.34 or 1.0.x
- refactor of help generation logic, no change to help text output
- the
glint/flag
module loses theflags_help
andflag_type_help
functions - the
glint
module gains the ArgsCount type and thecount_args
function to support exact and minimum arguments count - the
glint
module gains thenamed_args
function to support named arguments - the
glint.CommandInput
type gains the.named_args
field to access named arguments - help text has been updated to support named and counted arguments
- updated to work with gleam 0.33
- removed deprecated stub api
- clean up
flag.get_*
andflag.get_*_values
functions - update to gleam 0.32
- update to gleam v0.20
flag
module now provides a getter per flag type instead of a unified one that previously returned theValue
type.glint
gains thewith_print_output
function to allow printing of command output when callingrun
.- new builder api for commands and flags:
glint.cmd
to create a commandglint.description
to attach a description to a commandglint.flag
to attach a flag to a commandflag.{int, float, int_list, float_list, string, string_list, bool}
to initialize flag buildersflag.default
to attach a default value to a flagflag.constraint
to attach a constraint to a flag
- rename
glint.with_global_flags
toglint.global_flags
glint
gains theglobal_flag
andflag_tuple
functions.
- fixes string concat precedence bug
- works on gleam 0.27
0.11.1 - 2023-03-16
- make
glint/flag.Contents
non-opaque.
0.11.0 - 2023-02-08
- colour for pretty help leverages the new
gleam_community/colour
andgleam_community/ansi
packages.
0.10.0 - 2022-11-29
- use gleam's new
<>
string concat operator - use gleam's new
use
keyword for callback declaration
0.9.0 - 2022-09-16
- help text can now be set to use configurable shell colours.
- added the
style
module to handle coloured help output glint
gains theGlint(a)
wrapper typeglint
gains theConfig
typeglint.new
returns aGlint(a)
instead of aCommand(a)
glint
gains helpers such aswith_config
,default_config
, andwith_pretty_help
flag.get_value
renamed toflag.get
glint
gains global flag support, withglint.global_flags
0.8.0 - 2022-05-09
flag.Contents
is no longer opaqueglint
module gainsStub
type to create constant commands andadd_command_from_stub
to add the resulting commands
0.7.4 - 2022-05-03
- refactor: negation operator in
flag.gleam
instead of bool.negate - refactor: split
flag.update_flags
into callingupdate_flag_value
orattempt_toggle_flag
0.7.3 - 2022-02-23
- make
flag.Contents
opaque
0.7.2 - 2022-02-22
- add argument labels to
flag.get_value
0.7.1 - 2022-02-22
flag.access_flag
renamed toflag.access
flag.get_value
added
0.7.0 - 2022-02-22
- rename flag
*_list
functions - rename
flag.FlagValue
toflag.Internal
- rename
flag.FlagMap
toflag.Map
- generate help messages for commands and flags
0.6.0 - 2022-02-11
Runner
returns a generic type- sanitize command paths
- make flag prefix a const
- make flag delimiter a const
0.5.0 - 2022-01-31
- boolean flag toggle support added
0.4.0 - 2022-01-28
- flag string chopping has been moved into
flag
module - flags are split from args list, so flags are no longer positionally dependent
flag
parsing functions share common basesparse_flag
andparse_list_flag
0.3.0 - 2022-01-13
flag
module gains support for float and float list flags.- rename
FlagValue
constructors to be more concise.
flag
module gains support for string list and int list flags.
- Use
--
for flags instead of-
. - Add
example
directory.
- README update.
- refactor
gling.add_command
.
- Initial argument parsing and flags support.