On 09/05/2011 11:58 AM, Bruce Dubbs wrote: > DJ Lucas wrote: >> Taken from cross-lfs: >> >> sed -i 's@\(^#define DEFAULT_EDITOR_PROGRAM \).*@\1"vi"@' lib/config.h >> >> >> Any reason not to do this in LFS? > I have never seen the use of an editor in diffutils, but I learn new > stuff all the time. The only place DEFAULT_EDITOR_PROGRAM is in the > code is sdiff. > > After some looking, I found Section 2.5.1 in the diffutils info page > about 'ed' scripts. > > "`diff' can produce commands that direct the `ed' text editor to change > the first file into the second file. Long ago, this was the only > output mode that was suitable for editing one file into another > automatically; today, with `patch', it is almost obsolete. Use the > `--ed' (`-e') option to select this output format." > > It looks like diffutils uses 'ed' to produce old style scripts. I have > no idea if changing 'ed' to 'vi' will break this obsolete functionality > or not, but it might. > > If the change is made, then it needs to be tested and the info page > updated. I don't think it's worth the effort. > > -- Bruce vimdiff gives similar functionality...though I'd likely never use it.
Actually, on second thought, that could be pretty useful! I may wind up adding that to my regular toolset yet. -- DJ Lucas -- This message has been scanned for viruses and dangerous content, and is believed to be clean. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page