Skip to content

Offer PROCESS_TEXT apps (dictionary / translate) in the terminal text-selection action mode #5253

Description

@preyevates

Feature request

Add android.intent.action.PROCESS_TEXT activities to the terminal's text-selection action mode,
the way a standard TextView does — so installed dictionary, translation and lookup apps appear
alongside Copy / Paste when text is selected in the terminal.

Why the usual fix does not apply here

This is not the Android 11 package-visibility problem that affects most apps. Termux targets
SDK 28, so package visibility filtering
does not apply to it at all — it can already resolve every PROCESS_TEXT handler on the device.
Adding a <queries> block to the manifest would change nothing.

The gap is that selection is handled by TerminalView's own ActionMode rather than a standard
TextView, so the framework never contributes its PROCESS_TEXT menu items. Populating them
would need an explicit queryIntentActivities() call for
ACTION_PROCESS_TEXT + text/plain, with each result added as a menu item that starts the
activity with EXTRA_PROCESS_TEXT set to the selection (and EXTRA_PROCESS_TEXT_READONLY true,
since terminal output is not editable).

Why it is worth doing

The terminal has become a primary reading surface, not just a place to type commands — long tool
output, logs, man pages, and increasingly the transcripts of CLI coding agents. That is exactly the
text where an unfamiliar term shows up, and it is the one surface with no workaround: because the
action mode is custom, there is no Share entry to fall back on either.

Users who do not have any such app installed would see no change, since the query returns nothing
and no items are added.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions