Fix shell integration being disabled with one invalid option

This commit is contained in:
pagedown
2022-03-08 23:42:41 +08:00
parent 958ebb72a6
commit 46889a3a32
2 changed files with 5 additions and 2 deletions

View File

@@ -804,7 +804,7 @@ def shell_integration(x: str) -> FrozenSet[str]:
q = frozenset(x.lower().split())
if not q.issubset(s):
log_error(f'Invalid shell integration options: {q - s}, ignoring')
return q & s
return q & s or frozenset({'invalid'})
return q