bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Permit user to select keys when using sdiff merge


From: Chuck Swiger
Subject: Re: [PATCH] Permit user to select keys when using sdiff merge
Date: Fri, 17 Sep 2004 19:23:32 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910

Paul Eggert wrote:
Chuck Swiger <address@hidden> writes:
http://www.pkix.net/~chuck/sdiff2.diff

Sorry, I don't get the point of that proposed change.
Why is it needed?

Not everyone speaks English as their native language, Paul. Someone who speaks French might find "g" and "d" more intuitive ("gauche" and "droite"), for example.

English speakers might prefer "1" and "2" over "l" and "r", since that allows one to use the left hand to type them (and "q" or "e" as needed), while using their right hand to hit return after each section of a file has been merged. It also makes sdiff feel somewhat more like the comm program.

FreeBSD users happen to use sdiff's merge mode extensively during system updates while running a tool called "mergemaster". A feature request was made about changing the merge behavior in the following thread:

http://lists.freebsd.org/pipermail/freebsd-current/2004-August/036062.html

When you run sdiff over a few hundred files to merge changes to /etc every month or so per machine one manages, being able to choose which keys to use makes users happier. A fair number of FreeBSD users have wanted to see a change like this for a while, as one might gather from the various opinions which appear in that thread.

Why should it be an environment variable rather than a new option?

Which keys a user wants to use is a preference which is unlikely to change from one run of sdiff to another. I chose to implement using an environment variable for much the same reason that many programs pay attention to $PAGER, even if they don't provide a command-line option to select a pager.

On the other hand, I don't see any reason why the functionality could not be exposed via a CLI flag in addition, if that pleases you.

Also, any such change would need documentation....

Sure, if you run "sdiff -o" and ask, one gets:

%help
l or 1: use the left version
r or 2: use the right version
e 1:    edit then use the left version
e 2:    edit then use the right version
e b:    edit then use the left and right versions concatenated
e:      edit a new version
s:      silently include common lines
v:      verbosely include common lines
q:      quit

If you're referring to other documentation like manpages or info docs, I haven't been able to locate much about sdiff's merge mode in the existing docs...?

--
-Chuck





reply via email to

[Prev in Thread] Current Thread [Next in Thread]