Req: Add description support for Send shell command buttons

Support for Android version of Total Commander

Moderators: Hacker, Stefan2, white, sheep

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

Req: Add description support for Send shell command buttons

Post by *DrShark » 2018-02-07, 10:07 UTC

"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.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

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

Post by *ghisler(Author) » 2018-02-08, 10:19 UTC

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
http://www.ghisler.com

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

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

Post by *DrShark » 2018-02-08, 12:02 UTC

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)
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

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

Post by *DrShark » 2018-02-14, 18:56 UTC

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"
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

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

Post by *ghisler(Author) » 2018-02-15, 10:21 UTC

It seems to happen when the comment is 5 or less characters. I will change it.
Author of Total Commander
http://www.ghisler.com

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

Post by *DrShark » 2018-03-04, 14:39 UTC

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.
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

Post Reply