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

[FEATURE] Diff command to compare against local changes #230

Open
dnaka91 opened this issue Jan 11, 2023 · 2 comments
Open

[FEATURE] Diff command to compare against local changes #230

dnaka91 opened this issue Jan 11, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dnaka91
Copy link
Contributor

dnaka91 commented Jan 11, 2023

Is your feature request related to a problem? Please describe.

Depending on the program used, it's often easy to forget about the linked dotfile and make some changes through the application's UI, then later unintentionally resetting those changes when calling bombadil link.

Therefore, it would be great to have a new command to compare the local files against the template output.

Describe the solution you'd like

A new diff command, that first renders all the templates, then compares them against the currently linked files and drops into a diff (like git diff). Could be either on the terminal, or send the diffs to a default application, similar to diffing with Git.

This might be extended into making the link command run a diff by default, then showing the diffs and asking to continue before overwriting all the files.

Describe alternatives you've considered

Additional context

@dnaka91 dnaka91 added the enhancement New feature or request label Jan 11, 2023
@dnaka91
Copy link
Contributor Author

dnaka91 commented Jan 11, 2023

Might be related to #138

@oknozor
Copy link
Owner

oknozor commented Jan 11, 2023

This would be a nice addition indeed.
I think sending diff to an external pager application preferable.

The easiest way to implement this would be to use imara-diff
which produces standard git diff output. From there we would be able to use existing git pagers such as git-delta etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants