-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fresh Diff Support #129
Comments
This may not be as difficult to implement as it first appears. Everything is first built in I prefer to think of this as something which will show you what will change rather than as something that will show you what you’re about to lose. The main difference would be the diff direction. I am thinking we will probably call this We probably also want to be able to customise the diff tool used. The default would call |
Whichever direction the diff is specified in, it protects me from accidentally blowing away configuration changes - which is brilliant - and this in particular sounds bang on (especially as it'll account for filters, which I didn't think about before). Perhaps being consistent with the way Git itself handles diff tools would work? With defaults like: FRESH_EXTERNAL_DIFF=diff
FRESH_DIFF_OPTS=-r |
I’m not sure we should split the args off into a separate environment variable. “External” seems a bit redundant too as fresh doesn’t have an internal diff tool. |
This is true. I suppose if you want to pass more options to diff, it's fairly plain that you need to specify which application you're calling - |
This is a cool idea. Perhaps the default could be |
That's certainly what I'd set it to - much easier to read. Plus - colours! |
Cool. I didn’t know about |
I doubt this is possible for files made up of multiple source files, but it might work for things like monolithic configuration files.
Things write to my fresh-managed files - it's a fact of life. I may change a setting in an application - which will write its config file (ignoring the fact its read only). As it's possible to know the source file in my
.dotfiles
directory for each file it creates in thebuild
directory - is there any scope for adding afresh diff
command?Say I have a file called
tmux.conf
and a line in my.freshrc
like this:If I invoke
fresh diff tmux.conf
- fresh could do this:and show me what (if any) changes have been made to my tmux file, so I can check if I'm about to blow anything away by running
fresh
, or am making changes. Thoughts?Edit: Also, fresh is absolutely fantastic. It keeps me sane working on different machines and is absolutely the most useful utility that I have (and have everywhere). Thank you!
The text was updated successfully, but these errors were encountered: