Use the builtin envvar role for env vars

Also fix some broken links
This commit is contained in:
Kovid Goyal 2021-07-20 13:29:39 +05:30
parent c7ee776349
commit 624991b9b7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
5 changed files with 8 additions and 7 deletions

View File

@ -103,9 +103,9 @@
.. role:: bold
.. role:: cyan
.. role:: title
.. role:: env
'''.replace('VERSION', str_version)
nitpicky = True
# -- Options for HTML output -------------------------------------------------

View File

@ -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}

View File

@ -39,7 +39,7 @@ class OptionDict(TypedDict):
: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

View File

@ -41,13 +41,14 @@ def expand(m: Match) -> 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))

View File

@ -656,7 +656,7 @@
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() # }}}