Repository navigation
Immutable
release. Only release title and notes can be modified.
CONGA v0.11.0 makes completion follow each field's declaration more closely: an enum narrows the field's predictor, map values complete from their value type, and a type's Predict runs only when the shell completes that field. Programs that declare enum on path fields now fail at startup.
🚀 Highlights
enumnarrows completion: A field with anenumtag offers only theenumvalues, drawn from its predictor so they keep their descriptions and order.system.Signalwithenum:"TERM,INT,HUP"now offers three signals instead of every spelling of every signal. The newpredict.Predictor.Includeexposes the same filter to predictor authors (#218, closes #128).- Map values complete: Map flags and positionals complete the value after
key=from the value type's predictor, somap[string]*time.Locationwithtimezone.RegisterLocationoffers time zones aftereu=. A map withouthelpnames its value type in the hint, such as<key>=<Path to a file>(#223, closes #217). Predictruns only when needed: With completion enabled, ordinary runs,--helpand--whyno longer call every type'sPredict. A completion request calls it only for the field being completed (#222, closes #129).
⚠ Breaking Changes & Migration
enumon path fields fails at startup (#221): Schema build rejectsenumwithErrSchemaonconga.File,conga.Dir,conga.FileContent(including slices and pointers of them), on types implementingpredict.FileFilterable,DirFilterableorPathFilterable, and on fields with afile,dir,execorsymlinkpredictor. Removeenum, useglobonconga.File, or use a string field withenumand no path predictor.conga-lintreports the same error.
✨ Features
- completion: Add
predict.Predictor.Include(values ...string), and narrow a field's predictor to itsenumvalues (#218). - completion: Complete map values from their value type. Entries split at the first
=as the run does,predictor:"file"(ordir,exec,symlink) on a map completes the value afterkey=, and slice and map element predictors keep a timeout raised withTimeout(d)(#223).
🐛 Bug Fixes
- completion: Call a type's
Predictonly when completing that field. In programs with completion enabled, a panickingPredictnow fails only that field's completion request (exit 2) instead of crashing every run (#222). - completion: Slice completion keeps
envs/dev.yamlafterdev.yamlwas given.predict.Predictor.ExcludeandRawnow compare each candidate'sValueafterPrefixandSuffix, neverDisplay; on aMultiPartspredictor, callExcludeon the predictor the segment function returns (#218). - completion: Finished segmented values such as
--image api-gateway:v3.2.0and later list elements get a trailing space, andTimeoutalternatives keep their own modifiers (#218). - lint: Report the map tag rules (no
enum,rangeorlenon a map, string keys only) as the program does, stop reporting domain tags such asexisting:"true"onOptionalFlag[*conga.File]as unknown, and reportrangeon a map with the program's message (#221).
Full Changelog: v0.10.0...v0.11.0
Requirements: Go 1.27+ · Docs · pkg.go.dev