When using the include directive in kitty.conf make the environment variable KITTY_OS available for OS specific config

This commit is contained in:
Kovid Goyal
2022-12-04 21:03:24 +05:30
parent fda4aa21a1
commit d7d96c2e7b
4 changed files with 25 additions and 5 deletions

View File

@@ -31,7 +31,9 @@ You can include secondary config files via the :code:`include` directive. If
you use a relative path for :code:`include`, it is resolved with respect to the
location of the current config file. Note that environment variables are
expanded, so :code:`${USER}.conf` becomes :file:`name.conf` if
:code:`USER=name`. Also, you can use :code:`globinclude` to include files
:code:`USER=name`. A special environment variable :envvar:`KITTY_OS` is available,
to detect the operating system. It is ``linux``, ``macos`` or ``bsd``.
Also, you can use :code:`globinclude` to include files
matching a shell glob pattern and :code:`envinclude` to include configuration
from environment variables. For example::