base_item#
- class aws_resource_search.items.base_item.BaseArsItem(title: str, subtitle: ~typing.Optional[str] = None, uid: str = <factory>, arg: ~typing.Optional[str] = None, autocomplete: ~typing.Optional[str] = None, variables: ~typing.Dict[str, ~typing.Any] = <factory>)[source]#
Base class for all
zelfred.Itemsubclasses inaws_resource_searchproject.- open_url_or_print(ui: UI, url: str)[source]#
A helper user action method to open a URL in browser or print it to the terminal.
Sometime user are in a remote shell and doesn’t have default web browser. Then we print the url instead.
Note
This method will be used in the
enter_handler.
- copy_or_print(ui: UI, text: str)[source]#
A helper user action method to copy a text to clipboard or print it to the terminal.
Sometime user are in a remote shell and cannot use the clipboard. Then we print the value instead.
Note
This method will be used in the
ctrl_a_handlerorctrl_w_handler.
- open_file_or_print(ui: UI, path: Path)[source]#
A helper user action method to open a file in default application or print it to the terminal.
Sometime user are in a remote shell and doesn’t have an app to open a file. Then we print the url instead.
Note
This method will be used in the
enter_handler.
- post_enter_handler(ui: UI)[source]#
This is the abstract method that will update the UI after taking user action.
- Parameters:
ui – the
UIobject.
- post_ctrl_a_handler(ui: UI)[source]#
This is the abstract method that will update the UI after taking user action.
- Parameters:
ui – the
UIobject.
- post_ctrl_w_handler(ui: UI)[source]#
This is the abstract method that will update the UI after taking user action.
- Parameters:
ui – the
UIobject.