Bug 507026

Summary: useraction variable %aPath% ignoring protocol
Product: [Applications] krusader Reporter: Edvard Rejthar <kde>
Component: generalAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: alex.bikadorov, krusader-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.