Req: Add description support for Send shell command buttons

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Req: Add description support for Send shell command buttons

Post by *DrShark »

"Send shell command" button type supports 2 commands: sh and su.

Suggestion: if a word with a colon written besofore su or su, like here:

Code: Select all

Description:sh
, show the "Description" word in a first line of modify button context menu instead (or before) the actual command.

Such way it's possible to add/change a description for some other types of the button, like "Launch app", but for "Send shell command" the description would be especially helpful because by default all such buttons have the same "command line" icon.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Where would this description be shown? Currently when you long tap on such a button, TC shows both sh and the actual command.

Btw, you are free to choose any other icon for the button, e.g. from another app, or an image from your device.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Req: Add description support for Send shell command butt

Post by *DrShark »

ghisler(Author) wrote:Where would this description be shown? Currently when you long tap on such a button, TC shows both sh and the actual command.
DrShark wrote:... show the "Description" word in a first line of modify button context menu instead (or before) the actual command.
I had a hope I was clear... Real example:
Command:
Android commands::sh
Parameters:
*ls /system/bin

(there the colon before sh splits the description and the sh, all colons before are parts of description.)

So a long tap button context menu first line may be either:
Android commands:
(if we're replacing the sh *ls /system/bin with our description)
or
Android commands: sh *ls /system/bin
(if we're adding a description before sh+actual command)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

TC4A 2.81 beta 12[/url] / [url=http://ghisler.fileburst.com/android/history2.txt]history2.txt wrote:2018-02-14 Added: Button bar: Support comment for shell commands to be shown on long tap: Comment:sh or Comment:su
Thanks, I tried it. With added comment, in long tap menu TC now shows it instead of sh/su+command.
However, for one of my buttons it adds ":sh" to the comment in long tap menu. The button:
Function type:
Send Shell command
Command:
md5:sh
Parameters:
*md5 "%N"
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It seems to happen when the comment is 5 or less characters. I will change it.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

history2.txt wrote:2018-02-16 Fixed: Button bar: When showing comment for shell commands, e.g. Comment:sh or Comment:su, the actual command was also shown if the comment was too short
I can confirm the fix in TC4A 2.90 beta 1.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply