Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a config file format like ssh's #25

Merged
merged 8 commits into from
Dec 24, 2024
Merged

Conversation

crazyscot
Copy link
Owner

No description provided.

- Parser returns a HostConfiguration struct, which is a figment::Provider
- make it clear that you can only use Parser once
- extract arbitrary types from ssh config files
  - Use extract_lossy() to allow strings to coerce to ints and bools
  - Use figment Profile to specify that this is for a given host
- consolidate and deduplicate pretty-printing code in manager
- provide config source information
- improve config error output
  - add a newtype wrapper for figment::Error with custom Display
  - custom display for figment::error::Kind
- split up ssh.rs into component parts for readability
- merge Manager::default and Manager::empty
- rename Manager::new -> standard
- hide Manager::without_files() behind cfg(test)
…Host

- Update error message output to suit
- --show-config outputs settings for the job where possible
  - This overhauled DisplayAdapter::fmt()
  - Tweak source display for values read from files
  - add cli_beats_config_file test
- remove toml scaffolding
- update config module docs for file format
- AddressFamily
- - rename enum variants to Inet / Inet6 / Any
- - serialize as "inet4" / "inet6" to align with ssh config
- - accept aliases "4" / "6"
- - no need to use IntOrString now we've changed config file format
- PortRange
- - no need to deserialise via IntOrString
- - drop From<u64>
- - derive Default
- HumanU64
- - no need to deserialize from IntOrString
- - ser/de as string for now
- drop IntOrString as no longer used
@crazyscot crazyscot force-pushed the feat/ssh-style-config-file branch from 77e057e to ede84b0 Compare December 24, 2024 08:42
@crazyscot crazyscot merged commit eb935b6 into dev Dec 24, 2024
3 checks passed
@crazyscot crazyscot deleted the feat/ssh-style-config-file branch December 24, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant