Custom button-bar parameter syntax error: '(' unexpected ; due to round brackets

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jelsine
New Member
New Member
Posts: 1
Joined: 2020-04-01, 10:27 UTC

Custom button-bar parameter syntax error: '(' unexpected ; due to round brackets

Post by *jelsine »

Hi. I am using Total Commander v2.80 for Android and experience an error when using custom button-bar buttons that use the %P or %P%N parameters with paths containing round brackets before the final slash of the path. The error does not occur when using %T or %T%M in the inactive panel.

Here is a very basic example that produces the error...

Function type: Send shell command
Command: su
Parameters: *echo "%P%N"

If the path contains round brackets before the final slash I get the following error: sh: <stdin>[1]: syntax error: '(' unexpected

Example of path creating error: /storage/8CE0-6T02/folder_(2017)/file.ext

If the round brackets are only within the final section of the path then there is no error, eg: /storage/8CE0-6T02/folder_(2017)

I have also tried using printf "%s" "%P%N" but the error still occurs. Neither single or double quotes around the parameter seem to help either.

Maybe this is a bug. Thank you for making this great file manager. It is always the first app that I install.




- - - Edit by moderator:

User came back to modify his post for to add spam links as his footer >> signature removed >> User banned

Please help us and report such posts (see the [!] button) if you find them on browsing the forum, thanks.

[MTAG]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Custom button-bar parameter syntax error: '(' unexpected ; due to round brackets

Post by *ghisler(Author) »

Try using single quotes '%P%N' instead of double quotes. To my knowledge, strings within double quotes get interpreted, strings within single quotes are not.
Author of Total Commander
https://www.ghisler.com
Post Reply