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
feat(cli): add pixi config
command
#1339
Conversation
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Awesome! |
* `toml` crate been moved from dev-deps to deps Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
I found we already have the `toml_edit` crate that can be leveraged, therefore I think we can drop the `toml` crate. Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Old `snake_case` are still supported via serde alias, with this change the serialized output will always be `kebab-case` though. Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
ready for review |
I just played around with this a little. One thing I found is that a broken value just shows "no config found" instead of showing an error when I run |
I also just ran |
I also couldn't figure out if lists work (e.g. |
Hey @chawyehsu awesome job! I just briefly did some tests on my end for functionality (without looking much at the code). Let me know what you think about the comments :) Looking forward to shipping this! 🚢 |
If you mean "No configuration values found" then that's when all the options are default and no user defined ones. A different message could be used here but I'm not sure what's better.
Sounds good, will add.
For
Me neither. For me I would prefer
Do they support list type of options only? |
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work already! Left some comments.
src/config.rs
Outdated
}) | ||
.transpose()?; | ||
} | ||
_ => return Err(miette::miette!("unsupported key: {}", key)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be really nice if the user would get a list of options printed, I personally was making a stupid typo and it made me look into the code how it should be.
Also do you have any idea's how we could test if we support all options?
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
without requiring the `--global` flag. Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
group by top-level keys when doing pattern matching Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
He @chawyehsu, I've been using it now for some time and it feels great. Could you add documentation? And possible some examples to the
If that's in I would be happy to merge it! |
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
cb40fd9
to
b08ae59
Compare
Doc and test have been added. Also, two new subcommands mentioned above |
Thanks a lot @chawyehsu, this looks good to me! |
Closes #1022