# CHANGELOG - v2.1.61 - upgrade deps - security patches - v2.1.60 - [hs] improved help subsystem - fixed possible errors - improved codes for linting issues - upgrade deps - security patches - v2.1.55 - UPGRADE GO TOOLCHAIN TO 1.24.x (1.24.5) - upgrade deps - v2.1.51 - upgrade deps - security patch - v2.1.50 - upgrade deps - logg - update fg of INFO level - is - added `Color.AddAndNew()` - v2.1.48 - improved app version for dev-time `conf.Version` will be unchanged if passing an empty ("-") version from main() - update workflow file to improve release notes - upgrade deps - logg - fix error in verbose mode - v2.1.47 - update workflow file to improve release notes - upgrade deps - is - added more os & arch detector such as `BSD()` - logg - added `ResetDefault()` - store - doc to dupS - v2.1.46 - improved builtin help system command - support history commands - remove `dirs` since it moved into `hedzr/is` repo - added `ActionRunHelpSystem`, run it with `app.DoBuiltinAction(ctx,action)` - improved prompt example app (history support) - upgrade deps - is - added `dirs` for common folders; history supports in `makenewterm` - logg - added `Painter` interface (still unstable) - v2.1.45 - upgrade deps - security patches - v2.1.43 - improved `RedirectTo` - fix redirectTo cmd in help screen - changed to `RedirectTo(dottedPath string, recursive ...bool) CommandBuilder` support checking if any parents has been redirected so that a child subcmd can be forwarded as is - improved help screen - fix align between short cmd and long - REPLACED with new build system / gh actions / makefiles - v2.1.39 - improved `devmode` - cleanup codes moved into `is` lib - improved logics - remove `bi` as a title of `built-info` internal command - improved short-title in help screen - improved codes to describ `ParsedState` better - fix help system to work for `help` command without args - upgrade deps - `is` - improved cross-building and cross-working, add `devmode` state - `logg` - compliant with `devmode` in `is/states` - v2.1.38 - implement reverse binding to struct field when using `FromStruct(&structValue)` - commandbuilder: added `BindPositionalArgsPtr(varptr *[]string)` - flagbuilder: added `BindVarPtr(varptr any)` - improved structbuilder - improved devmode warning to tip developer the proper usage for bind-to-field - improved `ActionEnum`: added `ActionNone` - fix `~~debug` debug screen - added positional args dump section - fix default-value in help screen - sometimes envvar cannot be filled into default-value field - fix `onEnvVarMatched` to fill in default-value field, and typo - v2.1.37 - added `FromStruct()` to commandbuilder - reimplemented structbuilder to compliant with both root and subcmd cases - improved backtraceCmdNamesG to trace the cycle ref case of owner pointer, and give a warning to developer - fix `pkg/logz`'s `SetLevel()` to apply the setting level to global logz (`logg/slog`) - fix helpscreen to remove the double empty lines - fix `WithOpts` to take effects specially for `WithArgs(args...)` - upgrade deps - `is` - fix the raising `states.on[State]Changed` (state = Debug or Trace) - `logg` - fix/improved init.go for states changed - v2.1.36 - added `BuildFrom(structValue,opts...)` to `Creator` interface - added new example app `examples/tiny/struct` - added new builder `FromStruct` to build the command system from a struct value you can write a struct type and pass its value into FromStruct to build root command and its subcommands now. - fix `RootBuilder()` caused incorrect inCmd (-1) - fix a debug call - fix `OwnerIsNil` ... - v2.1.35 - improved `prompt` examples - fix withopts.go - uses `basics.Openable` - fix devmode.go - uses `term.DisableColors()` - upgrade deps - `is/term/color`, `term`, and `basics` - v2.1.31 - supported `SetCancelFunc()` & `WithCancelFunc()` cmdr.v2 manage ctx & cancel now, querying by `CancelFunc()` - improved `~~debug` output with the final value of a cmdline flag - improved `devmode.go` - update example apps - remove unnecessary codes - added prompt mode example app - upgrade deps - `is/term/color` - more `color.Color` implements - `Store` - support `BR()` - v2.1.27 - fix `color.Color` usages - extract common init seq to `earlierInitForNew` - upgrade deps - `is/term/color` - new `color.Color` type - `logg/slog` - fixed bugs - v2.1.26 - improved help-system - `app help` enter into prompt mode - added `Skip` to logz subpkg - `onEnvVarMathed`: improved the triggerring event - add missed `OnParsedValue` - devmode.go - disable info() in non-verbose-mode - fix dockerfile - remove `prompt` (move into cmdr-examples) - upgrade deps - `is/term` - added `MakeRawWrapped`, `MakeNewTerm` - `logg/slog` - improved howto dumping error object - v2.1.25 - improved devmode.go - improved doc; typo; example app code - upgrade deps - better ansi color builder - better err object in logz output - ensure stacktrace dumped in debug mode enabled - v2.1.23 - improved no-color mode [devmode.go] - ignore go test params in cmdline - improved help screen - nested indent for tree mode - improved no-color mode - improved `is.ColorfulTty` - improved pipe state detecting - improved help screen for pipe mode and redirect mode - v2.1.22 - added `passThruNow` for a subcmd - added `UpdateHitInfo` to `CmdS` - fix `HELP=1` not work - improved autoenv feature - changed: `APP_VERSION` has no effect to map into `--version` (but `VERSION` can do it) - fix `ignoreUnmatched` for a subcmd - add as positional arg without leading '-' - fix `desc`, `examples` fields for help screen - fix/improved `BaseOpt` fields order for better inspecting in debugging time - upgrade deps & security patch - v2.1.21 - added `ignoreUnmatched` for a subcmd so that all unmatched flags are treated as positional args instead of raising an error - improved infra-tests - added `CtxKeyHelpScreenWriter` for testing - confirm `TestStoreGetSectionFrom` worked - added `tasksAfterRun` for finalVerifier in testing - improved `taskAfterParse` - fix `baseopt.Set()` for top-level flags - fix `cmd.Store(...)` & `cmd.Set(...)` - fix `--version` & `-#` - fix `--` - fix `flag.required` (a typo) - fix `flag.Clone()` for the recently-added fields - fix command heading in help screen - upgrade deps & security patch - v2.1.19 - enhanced `RedirectTo` to work for subcmd - improved `RedirectTo` in help screen - trace all `redirected` commands, - trace all matched `redirected` commands to avoid the dead loop - matching the flag with the both owners: this and `redirected` command - fix too long valid args not break in help screen - support `COLS` envvar to override termsize detector - improved `printTailLine()` for help screen - improved logz level which will sync'd with cmdline flag matched (eg, `--debug`) - improved description, examples, notes in help screen - v2.1.18 - fix *not-hidden* cmd/flg if its owner/parent is hidden in helpscreen - added `Cmd.HiddenBR`/`VendorHiddenBR`, and impl them for `*CmdS` and `*Flag` - improved desc, examples, and notes fields in help screen - improved errcheck, added `errShouldStopParsingLoop` for better cancel the parser's loop - improved `onUnknownCommandMatched` warning message form - v2.1.17 - upgrade deps - security patches - v2.1.16 - new feature `-W`-style for `Negatable Flag` - fix `workerS.commandsToStoreR` to support negatable `-W`-style - review the toggle-group matched branch and improve it to support negatable `-W`-style - improved CmdS.ensureXrefFlags to support new negatable-style (`-W`-style) - add debug branch for `CmdS.FlagBy()` for debuggiing the longName not found case - improved the report in toggle_group example - add new params as `Negatable(b bool, items ...string)` - added `cli.CommandBuilder.ToggleableFlags(group, items...)` for batch creating toggle-group flags - fix `Flag.GetDottedNamePath()` - fix expanding for desc, examples, header, footer, note, ... - moved examples/*.go into examples/common to solve the cycle imports - update all example apps codes - remove some unused params - remove unprocessed return values - upgrade deps - v2.1.15 - remove deprecated ref (/x/term) - upgrade deps - v2.1.12 - fix wrong dep in last release - v2.1.11 - completed `generate shell` for autocompletion feature of supported shells - completed `generate man` for manpages generating in deployment time - added `App.GetRunner() Runner` - fix unique worker and add shared app feature, added examples/shared/ - fix workerS.String() - upgrade deps - security patches - v2.1.10 - fix a crash in printUsage() on a dyncmd object - upgrade deps - security patches - v2.1.9 - fix `~~tree` printing the root command - docs - upgrade deps - security patches - v2.1.8 - cmdr: fix command indent (help screen) - cmdr: remove `pkg/dir` since it moved into `hedzr/is` - cmdr: update ref to hedzr/is/dir - cmdr: mv `pkg/dir` into `hedzr/is` - upgrade deps - v2.1.7 - downgrade toolchain to go1.23.0 - upgrade deps - cmdr: review & improve builtins commands and flags - cmdr: add `OwnerIsRoot()`, `IsRoot()` - cmdr: improved help screen - cut overlong titles to a new line - rename to `printCommandHeading()`, ... - rename to `printFlagHeading()`, ... - optimize the gap between short and long title if short is not a single char - cut off aliases if titles width is greater than tabstop, and move them to the next line - improved head-like flag, add a new line to remark it - cmdr: improved head-like flag matching algor to search the parents commands if they own a head-like flag - cmdr: change to `Flag.GetTitleFlagNamesBy(delimiter string, maxW...int) (title,rest string)` - cmdr: change to `BaseOpt.GetTitleNames(maxWidth ...int) (title, rest string)` - v2.1.6 - cmdr: fix calling `finalAction()` twice when redirectTo - cmdr: fix modified state of peripheral object in store - cmdr: fix external config file loading and write-back feature - upgrade deps - v2.1.5 - lots of improvements and fixes - cmdr: add a pure `prompt` app (not a cmdr example) - cmdr: fix unnecessary required flag in head_like.go - cmdr: implements help-system (part 1) - update local `SplitCommandString()` - cmdr: update onAction, passing writer into builtin action handlers - cmdr: fix helpScreenWriter/debugScreenWriter - cmdr: relayout postProcess()/preProcess() - update .vscode/launch.json - upgrade deps - v2.1.3 - lots of improvements and fixes - cmdr: split `Painter` interface from `helpPrinter` - cmdr: implements core algor for manpage output - cmdr: implements `showHelpScreenAsMan()` - cmdr: improve builtins commands - cmdr: improve `showVersion()` - cmdr: improve `showBuildInfo()` - cmdr: add `StripOrderPrefix()` - cmdr: add `PipeToReader()` - cmdr: add `lite-app.json` for `examples/tiny/lite` app - cmdr: load `app.json` and `.app.json` with internal tiny json loader - cmdr: fix `EnsureTree()` call in `Build()` at first time - v2.1.2 - lots of improvements and fixes - fix dockerfile - fix InvokeProc/InvokeShell - fix `OnEvaluateSubCommandsFromConfig` - added WithOnShowVersion, ... - added conf.GitDesc, BuilderComment - implements onPassThruCharMatched, ... - implements onShowVersion, ... - improved dyncmd (alias) feature - cleanup - v2.1.1 - lots of improvements and fixes - add `.LeadingPlusSign()` to negatable testing - fix litecmd.go to fit for `cli.Cmd` - add `.OnEvaluateSubCommandsFromConfig()` to `jumpCmd` - for cmdr-tests/examples/concise app - cmdr: fix `GetTitleNamesArrayMainly()` by prefered extracting name field - cmdr: fix `GetTitleNamesArray()` by adding missed `shorts` titles - cmdr: fix `CmdS.EqualTo()` - cmdr: fix `BaseOpt.ShotTitle()` - cmdr: add `OnEvaluateSubCommandsFromConfig()` - cmdr: add `LeadingPlusSign()` - fix CmdS. `AddSubCommand` & `AddFlag` - cmdr: add `negatable` flag (auto `--no-XXX`) - cmdr: improved `WithPeripherals(peripherals PeripheralMap)` - cmdr: implement PresetCmdLines - cmdr: implement InvokeProc and InvokeShell - cmdr: fix checkValidArgs - cmdr: fix checkRequired - cmdr: exposed `InvokeProc/Shell/Shell/PresetCmdLines` - cmdr: add `To()` - cmdr: add Flag.`GetTriggerredTitle()` (=`GetHitStr()`) - cmdr: add `ParsedState()` - cmdr: add `TestStoreGetSectionFrom()` - cmdr: add `OnAction` to `Creator` - cmdr: add `DottedPathToCommandOrFlag()` - cmdr: add `ActionDefault` to `ActionEnum` - fixed/improved `CmdS.SubCmdBy()/FlagBy()` Hedzr - improved examples/ - add examples/cmd/preset-cmdline.go - add examples/cmd/invoke.go - add example app: valid-args - add example app: required - add example app: external-editor - upgrade deps - security patches - v2.1.0 - upgrade toolchain to go1.23.7 - lots of improvements and fixes - fix typo in doc of `WithBuilders` - fix test definition - fix `Shorts()` returned unique items - exposed more package-level functions - add test `TestBaseOpt_GetDottedPath` - more walk functions - some subtests for parsing duration, parse int,float,complex, ... - make ActionEnum constants public too - make `dottedPathToCommandOrFlagG` public (as `DottedPathToCommandOrFlag(dottedPath)` - cmdr: define group name constants - cmdr: add `Error` and `Recycle()` to `Runner` - cmdr: add `DoBuiltinAction` to `Runner` - cmdr: add App.OnAction - cmdr: help-screen: fix the right part alignment - cmdr: help-screen: fix no `Flags:` title when a cmd owns all hidden flags - cmdr: help-screen: fix no `Commands:` title when a cmd owns all hidden subcmds - cmdr: help-screen: improved display style of required flag, valid-args flag - cmdr: help-screen: improved display style of header line - cmdr: help-screen: improved display style of head-like flag - cmdr: help-screen: improved display style if a flag has no short title - cmdr: toggle-group: fix to update into Stpre when matched - cmdr: toggle-group: fix to update default matched value - cmdr: help-screen: improved display style of redirect-to command - cmdr: help-screen: improved display style of required flag - cmdr: help-screen: improved display style of required flag, valid-args flag - cmdr: process `TransferIntoStore` interface to support default toggle-group value, and other cases for future - cmdr: defined constant `cli.CommandsStoreKey` = "app.cmd" - cmdr: builder: fix addCommand - avoid loop ref by insert itself as a child - cmdr: builder: added WithOpts(opts...) - cmdr: builder: added `RootBuilder(func(cli.CommandBuilder))` - cmdr: added `cmdr.Create(...)` for creating a new app, a replacement for `New()` - added CmdS/Cmd.`IsDynamicCommandsLoading()` & `IsDynamicFlagsLoading()` - improved OnEvalSubcommands `Info` log line to `Verbose` - improved Flag.SetEnvVars to ignore empty string - improved godoc for flagbuilder.go - improved godoc for `RedirectTo`... - cli/worker: builtins: `help` command, removed `usage` alias name - cli/worker: builtins: `version-sim` command, removed `version-simulate` alias name - cli: added `CmdAdder` interface - cli: added `SubCmdBy(longName)` and `FlagBy(longName)` to find them by title - CmdS: exclude duplicated insertion - predefined envvars: added `$EXE`, `$EXE_DIR` - move out cli/examples to top level - help-screen: record last group name to improve printing list (esp for some hidden items at first of a group) - help-screen: expand env vars for the strings - help-screen: colLeftTabbedWidth 56 -> 46, decrease it - help-screen: added `printNotes()`, in printing redirect-to feature - builder: Info(): added some blank lines - other fixes and improvements - more docs - more examples - remove unused file and cleanup - upgrade deps - security patch - v2.0.17 - upgrade deps - security patch - v2.0.16 - upgrade deps - security patch - v2.0.15 - upgrade deps - security patch - v2.0.13 - upgrade deps - security patch - fixed ext file location moved - added TasksParsed and TasksPostCleanup - v2.0.11 - upgrade deps - bugs fixed - safe guard while cmdr not parsed - v2.0.10 - upgrade deps - bugs fixed - safer api (ParsedState) even if cmdr.Run not invoked yet - v2.0.10 - security patches - bugs fixed - improved `Description(...)`, `Examples(...)` - shorten default tail-line - update litecmd.go - v2.0.9 - security patches - bugs fixed - uniform Store() & CmdStore() apis: `Set()` and `Store()` - change `loader.Load` - removed `exec` subpackage since it had been removed to `hedzr/is` - fix bindOpts to detect user's Args via `WithArgs(...)` - prevent internal jsonLoaderS's file not exists error - fixed `ForFileMax` to return errors - update tiny app / sample codes - add `LoadedSources` - add `VarLogDir` - fix `VarRunDir` - add `app.SetDesc()` - add `app.Description()` - add auto-env-vars-bindings feature - fix building on windows - v2.0.8 - fixed help screen, the missing envvars list - fixed dirs.VarRunDir, ... - fixed dyn-commands - v2.0.7 - update deps - security patches - bugs fixed - new features added - v2.0.5 - update deps - security patches - v2.0.3 - split loaders as a standalone repo - split examples and tests to standalone - update deps - fix bugs - v2.0.2 - remove dep to loaders/, this will reduce more 3rd-party libs deps from main module - more tunes for APIs - v2.0.1 - fix/improve map -> struct, from hedzr/store - more tests, more docs - slight corrections - v2.0.0 initial commit - integrated with store.Store - preProcess, parse, and exec - help screen, external editor, try parse value, atoa subpackage - mutual exclusive, just once, prerequisites, circuit break - sbom, --config, debug info screen a (string) to any (type) - To convert a string to an exact value according to the given meme.