f78
Line Group Formats
'
'
'
'
In a line group format, ordinary characters represent themselves; conversion
specifications start with '%' and have one of the following forms.
'
'
'
'
'
'
'
'
'
'
'
'
'
The
'
--old-group-format='\begin{em}
%<\end{em}
' \
--new-group-format='\begin{bf}
%>\end{bf}
' \
old new
--old-group-format='\begin{em}
%<\end{em}
' \
--new-group-format='\begin{bf}
%>\end{bf} '
\
--unchanged-group-format='%=' \
--changed-group-format='\begin{em}
%<\end{em}
\begin{bf}
%>\end{bf}
' \
old new
--unchanged-group-format='' \
--old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
%<' \
--new-group-format='-------- %dN line%(N=1?:s) added after %de:
%>' \
--changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
%<-------- to:
%>' \
old new
These line groups are hunks containing only lines from the first file. The
default old group format is the same as the changed group format if it is
specified; otherwise it is a format that outputs the line group as-is.
These line groups are hunks containing only lines from the second file. The
default new group format is same as the the changed group format if it is
specified; otherwise it is a format that outputs the line group as-is
ffb
.
These line groups are hunks containing lines from both files. The default
changed group format is the concatenation of the old and new group formats.
These line groups contain lines common to both files. The default unchanged
group format is a format that outputs the line group as-is.
Stands for the lines from the first file, including the trailing newline. Each
line is formatted according to the old line format (see Line Formats).
Stands for the lines from the second file, including the trailing newline.
Each line is formatted according to the new line format.
Stands for the lines common to both files, including the trail-ing newline.
Each line is formatted according to the unchanged line format.
Stands for '%'.
Where C is a single character, stands for C. C may not be a backslash or an apostrophe. For example, '%c':'' stands for a colon, even inside the then- part of an if-then-else format,
which a colon would normally terminate.
Stands for the character with octal code O ,where O is a string of 1, 2, or 3 octal digits. For example, '%c'\0'' stands for a null character.
Stands for n's value formatted with F where F is a printf conversion specification and n is one of the following letters.
The line number of the line just before the group in the old file.
The line number of the first line in the group in the old file; equals e + 1.
The line number of the last line in the group in the old file.
The line number of the line just after the group in the old file; equals l + 1.
The number of lines in the group in the old file; equals l-f + 1.
Likewise, for lines in the new file.
If A equals B, then T, else, E. Aand Bare each either a decimal constant or a single letter interpreted as above.
This format spec is equivalent to T if A's value equals B's; otherwise it is equivalent to E. For example, '%(N=0?no:%dN) line%(N=1?:s)' is equivalent to 'no lines' if N (the number of lines in the group in the the new file) is 0, to '1 line' if N is 1, and to '%dN lines' otherwise.