[Thunar-dev] Using %-style formatting in Thunar custom actions
Mathias Brodala
info at noctus.net
Fri Jun 9 22:15:26 CEST 2017
Hi,
fliehen schrieb am 09.06.2017 um 14:15:
> shnsplit -f %f -t "%n. %t" -o flac %d/$(basename %f .cue).flac
>
> However, the formatting following the -t option is meant for
> shnsplit, not Thunar! Which means %n gets expanded into the file
> name. I've also tried using just %t, which is not used by Thunar, and
> that also breaks it. Perhaps it gets expanded into nothing.
>
> Is it impossible to give certain programs %-style formatting via
> custom actions? I've tried escaping using "\", to no avail.
You should be escape the "%" via a 2nd "%", thus:
shnsplit -f %f -t "%%n. %%t" -o flac %d/$(basename %f .cue).flac
See source:
https://github.com/xfce-mirror/thunar/blob/a763a7f965b467c5e2dc504493fcbdef9b30209b/plugins/thunar-uca/thunar-uca-model.c#L1667-L1668
Regards, Mathias
More information about the Thunar-dev
mailing list