Use the builtin envvar role for env vars
Also fix some broken links
This commit is contained in:
parent
c7ee776349
commit
624991b9b7
@ -103,9 +103,9 @@ rst_prolog = '''
|
||||
.. role:: bold
|
||||
.. role:: cyan
|
||||
.. role:: title
|
||||
.. role:: env
|
||||
|
||||
'''.replace('VERSION', str_version)
|
||||
nitpicky = True
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
@ -42,7 +42,7 @@ The piping environment
|
||||
--------------------------
|
||||
|
||||
When using :option:`launch --stdin-source`, the program to which the data is
|
||||
piped has a special environment variable declared, :env:`KITTY_PIPE_DATA` whose
|
||||
piped has a special environment variable declared, :envvar:`KITTY_PIPE_DATA` whose
|
||||
contents are::
|
||||
|
||||
KITTY_PIPE_DATA={scrolled_by}:{cursor_x},{cursor_y}:{lines},{columns}
|
||||
|
||||
@ -39,7 +39,7 @@ If this option is not specified, config files are searched for in the order:
|
||||
:file:`$XDG_CONFIG_DIRS/{appname}/{conf_name}.conf`. The first one that exists is used as the
|
||||
config file.
|
||||
|
||||
If the environment variable :env:`KITTY_CONFIG_DIRECTORY` is specified, that
|
||||
If the environment variable :envvar:`KITTY_CONFIG_DIRECTORY` is specified, that
|
||||
directory is always used and the above searching does not happen.
|
||||
|
||||
If :file:`/etc/xdg/{appname}/{conf_name}.conf` exists it is merged before (i.e. with lower
|
||||
|
||||
@ -41,13 +41,14 @@ def expand_opt_references(conf_name: str, text: str) -> str:
|
||||
|
||||
|
||||
def remove_markup(text: str) -> str:
|
||||
base = 'https://sw.kovidgoyal.net/kitty'
|
||||
|
||||
def sub(m: Match) -> str:
|
||||
if m.group(1) == 'ref':
|
||||
return {
|
||||
'layouts': 'https://sw.kovidgoyal.net/kitty/index.html#layouts',
|
||||
'sessions': 'https://sw.kovidgoyal.net/kitty/index.html#sessions',
|
||||
'functional': 'https://sw.kovidgoyal.net/kitty/keyboard-protocol.html#functional-key-definitions',
|
||||
'layouts': f'{base}/overview.html#layouts',
|
||||
'sessions': f'{base}/overview.html#sessions',
|
||||
'functional': f'{base}/keyboard-protocol.html#functional-key-definitions',
|
||||
}[m.group(2)]
|
||||
return str(m.group(2))
|
||||
|
||||
|
||||
@ -656,7 +656,7 @@ and the window is not the currently focused window
|
||||
opt('command_on_bell', 'none',
|
||||
option_type='to_cmdline',
|
||||
long_text='Program to run when a bell occurs.'
|
||||
' The environment variable :env:`KITTY_CHILD_CMDLINE` can be used to get the program running in'
|
||||
' The environment variable :envvar:`KITTY_CHILD_CMDLINE` can be used to get the program running in'
|
||||
' the window in which the bell occurred.'
|
||||
)
|
||||
egr() # }}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user