[dolphin] [Bug 488815] New: custom servicemenu exec line shell var parameter expansion no longer works
Mark Draheim
bugzilla_noreply at kde.org
Thu Jun 20 19:59:07 BST 2024
https://bugs.kde.org/show_bug.cgi?id=488815
Bug ID: 488815
Summary: custom servicemenu exec line shell var parameter
expansion no longer works
Classification: Applications
Product: dolphin
Version: 24.05.1
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: dolphin-bugs-null at kde.org
Reporter: rickscafe.casablanca at gmx.net
CC: kfm-devel at kde.org
Target Milestone: ---
***
If you're not sure this is actually a bug, instead post about it at
https://discuss.kde.org
If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
SUMMARY
My custom servicemenu .desktop files recently stopped working when their exec
line uses shell parameter expansion like ${foo%.*} or even a simple ${foo}
while $foo still works. Though ${foo:-bar} does return the foo value, so I am
at a loss at what is happening here.
I tried every way of quoting and escaping I could think of, the parameter
expansion either returns empty or the exec line fails with syntax errors.
STEPS TO REPRODUCE
1. create a simple servicemenu .desktop file with Exec=foo="%f"; cp "$foo"
"${foo%.*}x".copy
2. place the desktop file in ~/.local/share/kio/servicemenus
3. open a new dolphin window
4. create a file bar.txt
5. point the servicemenu action at it
OBSERVED RESULT
a file named x.copy is created, meaning the parameter expansion returned empty
EXPECTED RESULT
a file named bar.copy should be created
SOFTWARE/OS VERSIONS
Windows:
macOS:
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
ADDITIONAL INFORMATION
:~> cat .local/share/kio/servicemenus/testpe.desktop
[Desktop Entry]
Encoding=UTF-8
MimeType=all/all
Type=Service
Actions=copyPE
TryExec=cp
[Desktop Action copyPE]
Name=Copy with param expansion
Icon=text
Exec= foo="%f"; cp "$foo" "${foo%.*}x".copy
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the kfm-devel
mailing list