Merge branch 'ksi' of https://github.com/page-down/kitty
This commit is contained in:
@@ -804,7 +804,7 @@ def shell_integration(x: str) -> FrozenSet[str]:
|
|||||||
q = frozenset(x.lower().split())
|
q = frozenset(x.lower().split())
|
||||||
if not q.issubset(s):
|
if not q.issubset(s):
|
||||||
log_error(f'Invalid shell integration options: {q - s}, ignoring')
|
log_error(f'Invalid shell integration options: {q - s}, ignoring')
|
||||||
return q & s
|
return q & s or frozenset({'invalid'})
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from contextlib import suppress
|
|||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
|
||||||
from .constants import shell_integration_dir
|
from .constants import shell_integration_dir
|
||||||
from .options.types import Options
|
from .options.types import Options, defaults
|
||||||
from .utils import log_error, which
|
from .utils import log_error, which
|
||||||
from .fast_data_types import get_options
|
from .fast_data_types import get_options
|
||||||
|
|
||||||
@@ -170,6 +170,9 @@ def get_effective_ksi_env_var(opts: Optional[Options] = None) -> str:
|
|||||||
opts = opts or get_options()
|
opts = opts or get_options()
|
||||||
if 'disabled' in opts.shell_integration:
|
if 'disabled' in opts.shell_integration:
|
||||||
return ''
|
return ''
|
||||||
|
# Use the default when shell_integration is empty due to misconfiguration
|
||||||
|
if 'invalid' in opts.shell_integration:
|
||||||
|
return defaults.shell_integration
|
||||||
return ' '.join(opts.shell_integration)
|
return ' '.join(opts.shell_integration)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user