REJMERGE.CONF(5) | File Formats Manual | REJMERGE.CONF(5) |
rejmerge.conf
—
configuration file for rejmerge
/etc/rejmerge.conf |
This manual page describes the format of the rejmerge.conf file. This file can be used to alter the way rejmerge(8) displays file differences and performs file merges. Changing the default behavior is done by re-defining the shell functions rejmerge_diff, rejmerge_merge and shell variables EDITOR, PAGER.
This function is executed once for each rejected file. Arguments $1 and $2 contains the path to a temporary file where this function should write its result. The contents of the temporary file will later be presented to the user as the difference between the two files.
This function is executed when the user chooses to merge two files. Argument $1 and $2 contains the paths to the installed and rejected files. Argument $3 contains the path to a temporary file where this function should write its result. The contents of the temporary file will later be presented to the user as the merge result.
This function also has the option to set the variable REJMERGE_MERGE_INFO. The contents of this variable will be displayed as informational text after a merge has been performed. Its purpose is to provide information about the merge (e.g. “5 merge conflicts found”).
This variable defines the editor used in
rejmerge_merge operation instead of the default
EDITOR
environment variable.
This variable defines the pager used in
rejmerge_diff and rejmerge_merge
operations instead of the default PAGER
environment
variable.
If you want to produce side-by-side output for diffs, add the following line to your configuration file:
rejmerge_diff() { diff -y $1 $2 > $3 ; }
If you want to produce unified and colorized output:
rejmerge_diff() { diff -u --color=always $1 $2 > $3 ; }
If you want to use sdiff(1) to merge files instead of the default diff(1):
rejmerge_merge() { sdiff -o $3 $1 $2 ; }
December 27, 2023 | Zeppe-Lin |