OpenSSH client configuration parser, evaluator, and explainable resolver for MoonBit.
Dependencies
moon add jingmo653/sshconfig-resolve@0.1.0moon check --target all --warn-list +73 --deny-warn
moon run examples/basic
moon run --target native cmd/sshcfg -- versionmoon check --target all --warn-list +73 --deny-warn
moon build --target all --warn-list +73 --deny-warn
moon test --target all --warn-list +73 --deny-warn
moon run examples/basic
moon run --target native cmd/sshcfg -- version
moon run --target native cmd/sshcfg -- resolve \
--config test/interop/fixtures/p0-basic.conf api.example.testimport {
"jingmo653/sshconfig-resolve" @sshconfig,
}fn main raise {
let config = @sshconfig.parse("Host github.com\n User git\n")
let result = @sshconfig.resolve(
config,
@sshconfig.ResolveContext::new("github.com"),
)
guard result.get("user") is Some(user) else { fail("user should resolve") }
println(user.value)
}sshcfg resolve --config ./ssh_config github.com
sshcfg explain --config ./ssh_config --format json github.com
sshcfg lint --config ./ssh_config --deny-warnings
sshcfg versionbash scripts/run_conformance_smoke.sh
SSHCFG_INTEROP_REQUIRE_PROJECT=1 bash scripts/run_interop_suite.shfn host_matches(pattern : String, host : String) -> Boolfn parse_match_predicate(condition : String, arguments : Array[String]) -> MatchPredicate raise PatternErrorfn resolve_explained(config : Config, context : ResolveContext) -> ResolveOutcome raise ResolveErrorOpenSSH client configuration parser, evaluator, and explainable resolver for MoonBit.
Dependencies