Discussion:
Quoted %F and %U in Desktop Entries
Роман Чистоходов
2017-03-08 00:36:44 UTC
Permalink
How %F and %U should be handled when they're in quotes?
E.g. we have "%F" in Exec line and opens many files file1, file2, file3 at
once should they be passed as a single argument "file1 file2 file3" to the
application?
Роман Чистоходов
2017-03-08 00:44:14 UTC
Permalink
Oh, silly me.
It's said in the end of The Exec key page:
"Field codes must not be used inside a quoted argument, the result of field
code expansion inside a quoted argument is undefined. The %F and %U field
codes may only be used as an argument on their own."
Post by Роман Чистоходов
How %F and %U should be handled when they're in quotes?
E.g. we have "%F" in Exec line and opens many files file1, file2, file3 at
once should they be passed as a single argument "file1 file2 file3" to the
application?
Роман Чистоходов
2017-03-08 01:08:22 UTC
Permalink
Actually I was confused by Nautilus-Actions Configuration Tool that
supports this case.
E.g. create action with Command zenity and the following parameters:
--list --text="Nautilus-Actions parameters for the selected items:"
--column="Parameter" --column="Token" --column="Value" "space-separated
list of filenames" %%F "%F"
In Nautilus apply this action to the multiple files and you will see the
list of space-delimited file paths in the second column.
But Nautilus actions are not the same as Desktop Entries so nothing's wrong
here.
Post by Роман Чистоходов
Oh, silly me.
"Field codes must not be used inside a quoted argument, the result of
field code expansion inside a quoted argument is undefined. The %F and %U
field codes may only be used as an argument on their own."
Post by Роман Чистоходов
How %F and %U should be handled when they're in quotes?
E.g. we have "%F" in Exec line and opens many files file1, file2, file3
at once should they be passed as a single argument "file1 file2 file3" to
the application?
Continue reading on narkive:
Loading...