Add no-op to paste_actions
This commit is contained in:
parent
c064a2e559
commit
15eb03c5e2
2 changed files with 4 additions and 3 deletions
|
|
@ -567,6 +567,8 @@
|
|||
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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue