Bug 470672 - Attempt to run external tool on freshly created and unsaved file fails because no file provided to said tool
Summary: Attempt to run external tool on freshly created and unsaved file fails becaus...
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 21.12.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-05 15:32 UTC by mikhaeldanilov
Modified: 2023-06-06 07:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
json format full file stdin (51.29 KB, image/png)
2023-06-06 07:05 UTC, Waqar Ahmed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikhaeldanilov 2023-06-05 15:32:55 UTC
STEPS TO REPRODUCE:
1.  Run Kate
2.  Create new  (ctrl + N)
3.  Write something in
4. Try to Tools->External Tools->Tools->JSON Full File Format

OBSERVED RESULT:
'Malformed URL' error was displayed.

EXPECTED RESULT:
Json formatting was applied to editor contents.
Comment 1 Justin Zobel 2023-06-06 02:20:02 UTC
I am unable to replicate this on Kate 23.04.1. Can you please try using a snap or flatpak version of Kate as 21.12.3 is quite old and this issue is quite possibly already fixed.
Comment 2 Waqar Ahmed 2023-06-06 07:05:18 UTC
You need to change the tool configuration so that it can read from STDIN. This is fixed in a later version AFAIR.

Pasting a screenshot of what the config should look like.

Alternatively, consider upgrading to the latest Kate version which has  a formatting plugin that does the job in a much better way.
Comment 3 Waqar Ahmed 2023-06-06 07:05:42 UTC
Created attachment 159489 [details]
json format full file stdin