Hello!

First of all, I think that diffutils are great!
I also have 2 suggestions to make them *awesome*. I also don't think they
would need much modification
and would be easy to implement.

BACKGROUND

I came across this while using sdiff on my configuration files.
I noticed that sdiff compares 2 files in chunks. My situation was this:

I was aiming to make a third file from 2 files where I could interactively
chose which of the diffrences (left of right) I would like in the new file.

I ran sdiff like this:

sdiff -o /tmp/outfile /etc/newfile /etc/oldfile

Somewhere along the process I basically had 3 consequent lines that were all
either new or different.
I wanted to keep the first and the third line from the old file but include
the second line from the new file.
I could not do that (I even tried the -d flag) and the best i could achieve
was to include all the 3 lines
and then remove the second line from the new /tmp/outputfile file.

IDEA

At that moment, it occured to me, that if sdiff processed a text file line
by line,  I could have achieved this.

SUGGESTION 1

I suggest implementing a new flag for line-by-line processing, where a user
has the ability to decide on
each individual line that differs.

SUGGESTION 2

Somtimes, you have 2 different lines where 1 line suits you more than the
other, but still needs tome modification.
In such a case, it would be useful to have an option to edit just that one
line and then return to the interactive sdiff
process. This could be something as simple as a prompt with the pasted line
a user selected (either left or right) as
their base line.... then one could move back and forth with cursor keys and
insert/delete the text they wanted. After
pressing enter, they would return to the differential compharison and
proceed.


I think this would be a most excelelnt addition to the diff utility and come
in very handy on a daily basis.

Please inplement this function as it would be greatly beneficial.

Best regards,

Jan Rome

Reply via email to