file1 file2 file3-m kdiff3
file1 file2 file3-o
file1 will be treated as
If all files have the same name but are in different directories, you can reduce typework by specifying the filename only for the first file. E.g.:
dir1/filename dir2 dir3
This is very similar, but now it's about directories.
dir1 dir2 dir3kdiff3
dir1 dir2 dir3-o
For directory comparison and merge you can continue to read here.
To see all available command line options type
Options: -m, --merge Merge the input. -b, --base file Explicit base file. For compatibility with certain tools. -o, --output file Output file. Implies -m. E.g.: -o newfile.txt --out file Output file, again. (For compatibility with certain tools.) --auto No GUI if all conflicts are auto-solvable. (Needs -o file) --qall Don't solve conflicts automatically. (For compatibility...) --L1 alias1 Visible name replacement for input file 1 (base). --L2 alias2 Visible name replacement for input file 2. --L3 alias3 Visible name replacement for input file 3. -L, --fname alias Alternative visible name replacement. Supply this once for every input. --cs string Override a config setting. Use once for every setting. E.g.: --cs "AutoAdvance=1" --confighelp Show list of config settings and current values. --config file Use a different config file.
--cs allows you to adjust a configuration value that is otherwise only adjustable via the configure dialogs.
But be aware that when KDiff3 then terminates the changed value will be stored along with the other settings.
--confighelp you can find out the names of the available items and current values.
--config you can specify a different config file. When you often use KDiff3
with completely different setups this allows you to easily switch between them.
Many people want to use KDiff3 with some version control system. But when that version control system calls KDiff3 using command line parameters that KDiff3 doesn't recognise, then KDiff3 terminates with an error. The integration settings allow to specify command line parameters that should be ignored by KDiff3. They will appear in the usage help like in this example:
fooIgnored. (User defined.)
A list of options, separated via semicolon ';'. When one of these options appears on the commandline, then KDiff3 will ignore it and run without reporting an error. (Default is "u;query;html;abort").
When this isn't enough, then it is recommended to write a shell script that does the option translation.