terminal#
This module contains functions to manipulate terminal output.
- aws_resource_search.terminal.terminal = <blessed.terminal.Terminal object>#
The terminal object is a singleton instance of
blessed.Terminal. We only create this object once and use it in therun_ui().
- aws_resource_search.terminal.format_shortcut(key: str) str[source]#
Format a keyboard shortcut key. In this project, the color is magenta. Example:
Enter to open url
- aws_resource_search.terminal.highlight_text(text: str) str[source]#
Highlight a text with terminal color. In this project, the color is cyan. Example:
this is a very Important message!
- aws_resource_search.terminal.format_resource_type(resource_type: str) str[source]#
Format a resource type text with terminal color. In this project, the color is blue. Example:
sfn-statemachine: name = CognitoUserManagement
- aws_resource_search.terminal.format_key(key: str) str[source]#
Format a key of key-value-pair text with terminal color. In this project, the color is cyan. Example:
tag environment = production
- aws_resource_search.terminal.format_value(value: str) str[source]#
Format a value of key-value-pair text with terminal color. In this project, the color is yellow. Example:
tag environment = production
- aws_resource_search.terminal.format_key_value(key: str, value: Any) str[source]#
Format a key-value pair text with terminal color. In this project, key is in cyan and value is in yellow. Example:
tag environment = production
- aws_resource_search.terminal.remove_text_format(text: str) str[source]#
Remove the terminal format from the given text.
- class aws_resource_search.terminal.ShortcutEnum[source]#
Formatted keyboard shortcuts:
print("Tap {ShortcutEnum.ENTER} to open url")
For example, the above code will print:
Tap Enter to open url
- aws_resource_search.terminal.SUBTITLE = '🌐 Enter to open url, 📋 Ctrl A to copy arn, 🔗 Ctrl U to copy url, 👀 Ctrl P to view details.'#
The subtitle in the zelfred UI.
The default subtitle is the help text to show the user how to interact with the UI.
Example:
🌐 Enter to open url, 📋 Ctrl A to copy arn, 🔗 Ctrl U to copy url, 👀 Ctrl P to view details.”
- aws_resource_search.terminal.SHORT_SUBTITLE = '🌐 Enter, 📋 Ctrl A, 🔗 Ctrl U, 👀 Ctrl P.'#
A shorter version of subtitle.
Example:
🌐 Enter, 📋 Ctrl A, 🔗 Ctrl U, 👀 Ctrl P.”