SUMMARY It seems that current Windows version of KDiff3 when launched from CLI with parameters detaches from the terminal, which returns directly to the prompt while kdiff3 is still open. This breaks usage as a diff tool in scripts. STEPS TO REPRODUCE C:\> kdiff3 file1 file2 -o file3 OBSERVED RESULT Immediate return to C:\> prompt. EXPECTED RESULT Return to prompt only when merge is finished and the application closed. SOFTWARE/OS VERSIONS KDiff3: 1.12.3 (64 bit) KDE Frameworks: 6.14.0 Qt: Using 6.8.3 and built against 6.8.3 Windows 11 Version 24H2 Build ABI: x86_64-little_endian-llp64 Kernel: winnt 10.0.26200
This looks to be default behavior of the windows terminal. Rather annoying if your used to linux which does not default to this behavior. I'll have look but a suspect kdiff3 can't influence this. That said power shell has "Wait-Process" which will hold the script up until a process is finished.
As expected this decision is made at the termial/OS level before passing control to kdiff3 or the Qt framework. Microsoft provides the start command for the use case you indicate where the termial must wait for kdiff3 to exit. The fallowing is example syntax for launching kdiff3 with a two way compasrison but having the terminal wait on it. Traditional command shell: start -Wait 'C:\Program Files\KDiff3\bin\kdiff3.exe' C:\CraftRoot\tmp\manifest.json C:\CraftRoot\tmp\manifest-20250503T163525.json PowerShell: start -Wait 'C:\Program Files\KDiff3\bin\kdiff3.exe' -ArgumentList [C:\CraftRoot\tmp\manifest.json, C:\CraftRoot\tmp\manifest-20250503T163525.json] PowerShell may be default in windows 11 but the traditional terminal can also be launched.
Thanks for checking and suggestions! I was indeed mixing up behavior on FreeBSD and Linux in my head with Windows.