-
Notifications
You must be signed in to change notification settings - Fork 494
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
chezmoi modify
command
#2826
Comments
Thanks, this is an interesting idea, but...
In summary, I don't think chezmoi should become an interpreter for a clever-hack language. Instead, I think it would be better for chezmoi to provide something like https://github.com/itchyny/gojq as a template function. |
I totally understand. Adding such command would expose chezmoi to being more than just a dotfiles manager, and I understand your concerns about the consequences of doing so. For my use case, I'd still be using it in the dotfiles context though, but I'm fine with the alternative (it's only sad that I can't achieve a similar diff style output as the other files being modified by my dotfiles).
That's interesting and may be useful for someone (currently not for me, I think). So, thanks for the discussion. I'll be closing this issue as not planned then, but feel free to reopen if there is still something you believe can be extracted from this. |
One note on |
Is your feature request related to a problem? Please describe.
Since I started using chezmoi modify template I never looked back. The solution is pretty clean, fast, and platform independent. But I believe it could be leverage for more than just managing some files in the sourceDir. For example, see this:
Where I'm using a
modify_settings.json
file to modify the VS Code settings for Windows from within chezmoi installed in WSL.Describe the solution you'd like
I believe it would be awesome if we had a command like
chezmoi modify <template> [<files>]
, which would modify<files>
with<template>
being a modify template and would respect some other chezmoi flags like--verbose
to output a diff or also--force
to ask/not ask for confirmation.Describe alternatives you've considered
Additional context
N/A
The text was updated successfully, but these errors were encountered: