Merge branch 'conf' of https://github.com/page-down/kitty
This commit is contained in:
commit
23b3b171fa
@ -113,6 +113,8 @@ def remove_markup(text: str) -> str:
|
|||||||
if key in ('ac', 'opt'):
|
if key in ('ac', 'opt'):
|
||||||
t, q = extract(m)
|
t, q = extract(m)
|
||||||
return f'{t} {q}' if q and q != t else t
|
return f'{t} {q}' if q and q != t else t
|
||||||
|
if key == 'code':
|
||||||
|
return m.group(2).replace('\\\\', '\\')
|
||||||
|
|
||||||
return str(m.group(2))
|
return str(m.group(2))
|
||||||
|
|
||||||
|
|||||||
@ -206,7 +206,12 @@ def parse_line(
|
|||||||
for x in os.environ:
|
for x in os.environ:
|
||||||
if fnmatchcase(x, val):
|
if fnmatchcase(x, val):
|
||||||
with currently_parsing.set_file(f'<env var: {x}>'):
|
with currently_parsing.set_file(f'<env var: {x}>'):
|
||||||
_parse(NamedLineIterator(base_path_for_includes, iter(os.environ[x].splitlines())), parse_conf_item, ans, accumulate_bad_lines)
|
_parse(
|
||||||
|
NamedLineIterator(os.path.join(base_path_for_includes, ''), iter(os.environ[x].splitlines())),
|
||||||
|
parse_conf_item,
|
||||||
|
ans,
|
||||||
|
accumulate_bad_lines
|
||||||
|
)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if not os.path.isabs(val):
|
if not os.path.isabs(val):
|
||||||
@ -240,7 +245,7 @@ def _parse(
|
|||||||
) -> None:
|
) -> None:
|
||||||
name = getattr(lines, 'name', None)
|
name = getattr(lines, 'name', None)
|
||||||
if name:
|
if name:
|
||||||
base_path_for_includes = os.path.dirname(os.path.abspath(name))
|
base_path_for_includes = os.path.abspath(name) if name.endswith(os.path.sep) else os.path.dirname(os.path.abspath(name))
|
||||||
else:
|
else:
|
||||||
from ..constants import config_dir
|
from ..constants import config_dir
|
||||||
base_path_for_includes = config_dir
|
base_path_for_includes = config_dir
|
||||||
|
|||||||
@ -3991,8 +3991,8 @@ keyboard protocol. The special value :code:`all` means all of them.
|
|||||||
Some more examples::
|
Some more examples::
|
||||||
|
|
||||||
# Output a word and move the cursor to the start of the line (like typing and pressing Home)
|
# Output a word and move the cursor to the start of the line (like typing and pressing Home)
|
||||||
map ctrl+alt+a send_text normal Word\\x1b[H
|
map ctrl+alt+a send_text normal Word\\e[H
|
||||||
map ctrl+alt+a send_text application Word\\x1bOH
|
map ctrl+alt+a send_text application Word\\eOH
|
||||||
# Run a command at a shell prompt (like typing the command and pressing Enter)
|
# Run a command at a shell prompt (like typing the command and pressing Enter)
|
||||||
map ctrl+alt+a send_text normal,application some command with arguments\\r
|
map ctrl+alt+a send_text normal,application some command with arguments\\r
|
||||||
'''
|
'''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user