file_item#

See FileItem.

class aws_resource_search.items.file_item.T_FILE_ITEM_VARIABLES(*args, **kwargs)[source]#
class aws_resource_search.items.file_item.FileItem(title: str, subtitle: ~typing.Optional[str] = None, uid: str = <factory>, arg: ~typing.Optional[str] = None, autocomplete: ~typing.Optional[str] = None, variables: ~aws_resource_search.items.file_item.T_FILE_ITEM_VARIABLES = <factory>)[source]#

Represent a file item in the dropdown menu.

enter_handler(ui: UI)[source]#

Behavior:

  • If we have a path, open it in the default app.

  • If not, nothing happens (most likely NOT)

ctrl_a_handler(ui: UI)[source]#

Behavior:

  • Copy the path to clipboard

ctrl_u_handler(ui: UI)[source]#

Behavior:

  • Copy the path to clipboard

classmethod from_file(path: Path, title: Optional[str] = None, subtitle: Optional[str] = None, uid: Optional[str] = None, arg: Optional[str] = None, autocomplete: Optional[str] = None)[source]#

Create one FileItem from an pathlib.Path object.