diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 20fb6f7f6..55c799857 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -567,6 +567,8 @@ The supported paste actions are: Run the filter_paste() function from the file :file:`paste-actions.py` in the kitty config directory on the pasted text. The text returned by the function will be actually pasted. +:code:`no-op`: + Has no effect. ''' ) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index ab7199a28..eb85346fa 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -940,11 +940,10 @@ def shell_integration(x: str) -> FrozenSet[str]: def paste_actions(x: str) -> FrozenSet[str]: - s = frozenset({'quote-urls-at-prompt', 'confirm', 'filter', 'confirm-if-large', 'replace-dangerous-control-codes', 'replace-newline'}) + s = frozenset({'quote-urls-at-prompt', 'confirm', 'filter', 'confirm-if-large', 'replace-dangerous-control-codes', 'replace-newline', 'no-op'}) q = frozenset(x.lower().split(',')) if not q.issubset(s): - log_error(f'Invalid paste actions: {q - s}, ignoring') - return (q & s) or frozenset({'invalid'}) + raise ValueError(f'Invalid paste actions: {q - s}, ignoring') return q