imediff1
An interactive fullscreen merge tool for 2 or 3 files
Usage
imediff [-h]
[-v]
[-abcdfg]
[-o
OUTPUT]
[-m]
[-n]
[-s]
[-t]
[-l]
[- ...]
file_a
file_b
[file_c]
Overview
Merge two (slightly different) files with an optional common base file interactively with a user friendly fullscreen interface in the full screen text terminal mode.
For diff2 case, these files are:
• file_a == OLDER
• file_b == NEWER
For diff3 case, these files are:
• file_a == MYFILE
• file_b == OLDFILE (base file)
• file_c == YOURFILE
imediff shows the differences of given two files (in color if the terminal supports them), lets you scroll the file and toggle changes between older and newer version for each chunk of difference. You can also select line diff and character wdiff mode for display. If you wish to make manual changes, you can edit each chunk with editor. The result of merge operation is saved in OUTPUT. If this is missing, STDERR is used.
Additionally, you can customize your choice of editor via $EDITOR or ~/.imediff. The default editor is /usr/bin/editor.
Removed lines are shown in reversed '???' as a placeholder, so you see that and you can select them. While it takes one line on display, it is naturally not saved into the output file.
To see the key binding, hit h in the main imediff screen.
To see the tutorial, hit H in the main imediff screen or simply start the imediff command without arguments.
The program exits with status 0 if the changes were saved, 1 if the merging was aborted and 2 if the parameters were invalid.
Options
-
-h, --help -
Show summary of options and exit.
-
-a -
Start with all chunks to use file_a.
-
-b -
Start with all chunks to use file_b.
-
-c -
Start with all chunks to use file_c (only for diff3).
-
-d -
Start with all chunks to use diff.
-
-f -
Start with all chunks to use wdiff.
-
-g -
Start with good merge mode. (only for diff3)
-
-o OUTPUT, --output=file_output -
Write output to a given file. If this is missing, STDERR is used.
-
-l, --force-logging -
Force LOGFILE="imediff.log" and LOGLEVEL="INFO".
-
-n, --non-interactive -
Use non-interactive CLI instead of normal TUI.
-
-s, --sloppy -
Allow one to save unresolved contents.
-
-t, --template -
Create a template configuration file ~/.imediff .
-
-v, --version -
Show version and license.
-...
For other options, see the tutorial by starting "imediff" without any arguments.
Releases
4 releases since Debian 10 (Buster); the text changed 2 times.
--force-logging since Debian 13 (Trixie);
--non-interactive since Debian 12 (Bookworm);
-l since Debian 12 (Bookworm);
-s since Debian 13 (Trixie);
-v since Debian 13 (Trixie).
--linerule until Debian 12 (Bookworm);
--macro until Debian 12 (Bookworm);
--mode until Debian 12 (Bookworm);
--mono until Debian 12 (Bookworm);
-V until Debian 12 (Bookworm);
-m until Debian 12 (Bookworm).