mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-06 08:01:58 +02:00
Add no-op to paste_actions
This commit is contained in:
@@ -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.
|
||||
'''
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user