Bug 507026 - useraction variable %aPath% ignoring protocol
Summary: useraction variable %aPath% ignoring protocol
Status: RESOLVED NOT A BUG
Alias: None
Product: krusader
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-14 13:05 UTC by Edvard Rejthar
Modified: 2025-07-16 08:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edvard Rejthar 2025-07-14 13:05:43 UTC
SUMMARY

It is currently impossible to get the file system in user actions.

STEPS TO REPRODUCE
1. Add a user action: echo %aPath%
2. Open a sftp://example.com/dir in a tab
3. Hit the user action, the output is `/dir`

OBSERVED RESULT
`/dir`

EXPECTED RESULT
Either `sftp://example.com/dir` OR have another variable to %aFilesystem%.

SOFTWARE/OS VERSIONS
Krusader: 2.8.1

ADDITIONAL INFORMATION
https://docs.kde.org/trunk5/en/krusader/krusader/useractions.html

My use case: To open a terminal in the same dir as the panel: `terminator --command "ssh $(echo \"%aPath%\" | sed -E 's#sftp://([^/]+)/(.*)#\1 -t \"cd /\2; bash\"#')"`
Comment 1 Alex Bikadorov 2025-07-15 20:02:25 UTC
Note the "Command accepts" option in the UI - also documented in the UserActions Handbook page you have linked. 

Does this solve the issue?
Comment 2 Edvard Rejthar 2025-07-16 08:40:01 UTC
I am really ashamed I've missed this. I didn't want to spoil your precious kde-dev time and did a several hours investigation before writing here. And still, I've missed this. Have a nice day.