Module: terminal.shortcuts.filters
Filters restricting scope of IPython Terminal shortcuts.
1 Class
- class IPython.terminal.shortcuts.filters.PassThrough
Bases:
FilterA filter allowing to implement pass-through behaviour of keybindings.
Prompt toolkit key processor dispatches only one event per binding match, which means that adding a new shortcut will suppress the old shortcut if the keybindings are the same (unless one is filtered out).
To stop a shortcut binding from suppressing other shortcuts: - add the
pass_throughfilter to list of filter, and - callpass_through.reply(event)in the shortcut handler.- __init__()
13 Functions
- IPython.terminal.shortcuts.filters.has_focus(value: str | Buffer | UIControl | Container | MagicContainer) Condition
Wrapper around has_focus adding a nice
__name__to tester function
- IPython.terminal.shortcuts.filters.ebivim() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
- IPython.terminal.shortcuts.filters.supports_suspend() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
- IPython.terminal.shortcuts.filters.auto_match() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
- IPython.terminal.shortcuts.filters.all_quotes_paired(quote, buf)
- IPython.terminal.shortcuts.filters.not_inside_unclosed_string() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
- IPython.terminal.shortcuts.filters.readline_like_completions() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.
- IPython.terminal.shortcuts.filters.is_windows_os() bool
Turn any callable into a Filter. The callable is supposed to not take any arguments.
This can be used as a decorator:
@Condition def feature_is_active(): # `feature_is_active` becomes a Filter. return True
- Parameters:
func – Callable which takes no inputs and returns a boolean.