Page 1 of 1

Req: Add description support for Send shell command buttons

Posted: 2018-02-07, 10:07 UTC
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.

Posted: 2018-02-08, 10:19 UTC
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.

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

Posted: 2018-02-08, 12:02 UTC
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)

Posted: 2018-02-14, 18:56 UTC
by DrShark
TC4A 2.81 beta 12[/url] / [url=https://plugins.ghisler.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"

Posted: 2018-02-15, 10:21 UTC
by ghisler(Author)
It seems to happen when the comment is 5 or less characters. I will change it.

Posted: 2018-03-04, 14:39 UTC
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.