SUMMARY Placeholders (%f, %d, %n) in run commands of build targets do not get substituted like in build commands. STEPS TO REPRODUCE 1. Activate build plugin 2. Open the tool view for build 3. Create a target 4. Add a run command with placeholders (e.g. python %f) 5. Run the target OBSERVED RESULT Placeholders %f, %d and %n do not get substituted with the current file path, working directory or filename, respectively. EXPECTED RESULT Placeholders in run commands should be replaced like in build commands. SOFTWARE/OS VERSIONS Operating System: EndeavourOS KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.9.0 Kernel Version: 6.14.2-arch1-1 (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION Link to substitution in build function: https://invent.kde.org/utilities/kate/-/blob/e2b4ffccb9a695b69a49680add5cae41754ad109/addons/katebuild-plugin/plugin_katebuild.cpp#L1098 Link to run-after-build function, where subsitution is missing: https://invent.kde.org/utilities/kate/-/blob/e2b4ffccb9a695b69a49680add5cae41754ad109/addons/katebuild-plugin/plugin_katebuild.cpp#L1428
True, I guess best would be to expand that at the same place to avoid that happens on the fly on completion, when one might have switched the document. Patches welcome :)
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1791
Can you test https://invent.kde.org/utilities/kate/-/merge_requests/1791 ?
Git commit cd2a282b1bef8f718b801c8e87f495e6f08e79b8 by Christoph Cullmann, on behalf of Kåre Särs. Committed on 15/06/2025 at 15:45. Pushed by cullmann into branch 'master'. Build: Add substitution support to run commands M +7 -1 addons/katebuild-plugin/TargetHtmlDelegate.cpp M +42 -12 addons/katebuild-plugin/plugin_katebuild.cpp M +7 -3 addons/katebuild-plugin/plugin_katebuild.h https://invent.kde.org/utilities/kate/-/commit/cd2a282b1bef8f718b801c8e87f495e6f08e79b8