euporie.core.bars.search

Define the global search toolbar and related search functions.

Functions

accept_search()

Accept the search input.

add_cmd(**kwargs)

Add a command to the centralized command system.

find()

Enter search mode.

find_next()

Find the next search match.

find_prev_next(direction)

Find the previous or next search match.

find_previous()

Find the previous search match.

find_search_control()

Find the current search buffer and buffer control.

find_searchable_controls(...)

Find list of searchable controls and the index of the next control.

get_app()

Get the current active (running) Application.

load_registered_bindings(*names[, config])

Assign key-bindings to commands based on a dictionary.

register_bindings(bindings)

Update the key-binding registry.

start_global_search([buffer_control, direction])

Start a search through all searchable buffer_controls in the layout.

stop_search()

Abort the search.

to_formatted_text(value[, style, auto_convert])

Convert the given value (which can be formatted text) into a list of text fragments.

Classes

Buffer([completer, auto_suggest, history, ...])

The core data structure that holds the text and cursor position of the current input line and implements all text manipulations on top of it.

BufferControl([buffer, input_processors, ...])

Control for visualizing the content of a Buffer.

Condition(func)

Turn any callable into a Filter.

Document([text, cursor_position, selection])

This is a immutable class around the text and cursor position, and contains methods for querying this data, e.g. to give the text before the cursor.

InputMode(*values)

PtkSearchToolbar

alias of SearchToolbar

SearchBar([search_buffer, vi_mode, ...])

Search mode.

SearchBufferControl([buffer, ...])

BufferControl which is used for searching another BufferControl.

SearchDirection(*values)

SelectionState([original_cursor_position, type])

State of the current selection.

class euporie.core.bars.search.SearchBar(search_buffer: Buffer | None = None, vi_mode: bool = False, text_if_not_searching: AnyFormattedText = '', forward_search_prompt: AnyFormattedText = ' Find: ', backward_search_prompt: AnyFormattedText = ' Find (up): ', ignore_case: FilterOrBool = False)

Bases: SearchToolbar

Search mode.

A search toolbar with custom style and text.

Accept the search input.

euporie.core.bars.search.find() None

Enter search mode.

euporie.core.bars.search.find_next() None

Find the next search match.

euporie.core.bars.search.find_prev_next(direction: SearchDirection) None

Find the previous or next search match.

euporie.core.bars.search.find_previous() None

Find the previous search match.

euporie.core.bars.search.find_search_control() tuple[SearchBufferControl | None, BufferControl | None]

Find the current search buffer and buffer control.

euporie.core.bars.search.find_searchable_controls(search_buffer_control: SearchBufferControl, current_control: BufferControl | None) list[BufferControl]

Find list of searchable controls and the index of the next control.

Start a search through all searchable buffer_controls in the layout.

Abort the search.