0.17 phase 5 PR C: defaults_keys, chown_owner_group, macos apps + spec patches#146
Open
StanMarek wants to merge 7 commits into
Open
0.17 phase 5 PR C: defaults_keys, chown_owner_group, macos apps + spec patches#146StanMarek wants to merge 7 commits into
StanMarek wants to merge 7 commits into
Conversation
…th native providers/statics
20959ac to
dd21fce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NEEDS_PREV_ARGconstant +inject_prev_arghelper incrates/gc-suggest/src/providers/mod.rs; the gc-pty handler now copiesctx.args.last()intoparams["prev_arg"]for the listed kinds (today:DefaultsKeys).defaults_keysprovider parses the top-level keys ofdefaults read <domain>output (brace+paren depth tracked across nested dicts/arrays, conservative on ambiguity).specs/defaults.jsonroutesread/write/delete/rename/read-typekey args to it.chown_owner_groupcolon-aware provider replaces the legacy[dscl_users, dscl_groups]pair onchown's first arg. Pre-prefixesOWNER:GROUPtext so nucleo's:delimiter doesn't strand the user mid-token.read_users/read_groupsreuse the existingdscl_principalshelpers.macos_applications+macos_bundle_identifiersproviders backed by Spotlight (mdfindfor app paths,mdls -name kMDItemCFBundleIdentifier -rawper path, capped at 500 to bound worst-case latency). Spawn-timeENOENT→Ok(vec![])so non-macOS hosts degrade silently.specs/open.json(-a→macos_applications,-b→macos_bundle_identifiers),specs/osascript.json(script arg →template: "filepaths",-l→ staticAppleScript/JavaScript),specs/codesign.json(-o→ 8 static option suggestions,--entitlements/--keychain/--resource-rules→template: "filepaths",--preserve-metadata=listrefactored into a--preserve-metadataflag + variadic args with 6 suggestions). Corpus invariantEXPECTED_UNSUPPORTED_WITHOUT_RUNTIMEbumped 295 → 292.Test plan
cargo test -p gc-suggest defaults— 13 lib + 2 golden, all passcargo test -p gc-suggest chown— 7 new colon-aware tests + 11 existing, all passcargo test -p gc-suggest macos_apps— 6 lib + 2 integration, all passcargo test -p gc-suggest --test golden_specs— 30/30 (incl. 7 new goldens: open -a/-b, osascript -l, codesign -o, chown, defaults read/write)cargo test -p gc-suggest engine— cleancargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleanFull workspace
cargo test --workspacepasses (720+ lib + integration tests).References
docs/plans/0.17-polish-and-trust/5-macos-smart-completions/plan.mdTasks 6–10.