Add completion spec: systemctl#204
Merged
Merged
Conversation
Add JSON completion spec and Rust generators for systemctl, covering:
- All subcommands from systemctl --help (unit commands, unit file commands,
machine commands, job commands, environment commands, manager state commands,
and system commands)
- All global options
- Three generators:
- units: combines list-units and list-unit-files for comprehensive unit name
completions with state descriptions
- unit_types: dynamic completion for --type option
- unit_states: dynamic completion for --state option
Co-Authored-By: Oz <oz-agent@warp.dev>
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
Add a comprehensive completion spec for
systemctl, the systemd service manager CLI.JSON Spec (
systemctl.json)systemctl --helporganized by category:Generators (
systemctl.rs)Three generators for dynamic completions:
units: Combineslist-unitsandlist-unit-filesoutput with deduplication, showing unit state as descriptionunit_types: Dynamically fetches available unit types via--type=helpunit_states: Dynamically fetches available unit states via--state=helpTesting
script/presubmitConversation: https://staging.warp.dev/conversation/4c48b63b-7e62-4d1a-aa6a-1501b6ce7168
Run: https://oz.staging.warp.dev/runs/bf968e47-4078-4ab7-9137-d2643aa8cf5e
This PR was generated with Oz.