Note on how to use include for DRYer config

This commit is contained in:
Kovid Goyal 2022-03-04 07:13:56 +05:30
parent ad7c251f56
commit ef9adc92c8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 4 deletions

View File

@ -42,11 +42,11 @@ quick example:
env COPIED_VAR=_kitty_copy_env_var_
# Create some per hostname settings
hostname *.myservers.net
hostname someserver-*
copy env-files
env SOMETHING=else
hostname somehost.org
hostname somehost
copy --dest=foo/bar some-file
copy --glob some/files.*
@ -66,7 +66,7 @@ editor, respectively:
.. code-block:: conf
# Have these settings apply to servers in my organization
hostname *.my-organization.net
hostname myserver-*
# Setup zsh to read its files from my-conf/zsh
env ZDOTDIR $HOME/my-conf/zsh

View File

@ -29,7 +29,9 @@ The hostname the following options apply to. A glob pattern to match multiple
hosts can be used. When not specified options apply to all hosts, until the
first hostname specification is found. Note that the hostname this matches
against is the hostname used by the remote computer, not the name you pass
to SSH to connect to it.
to SSH to connect to it. If you wish to include the same configuration for many
different hosts, you can do so with the :code:`include` directive (see :doc:`conf`),
so that you need only two lines per host.
''')
opt('+copy', '', option_type='copy', add_to_default=False, long_text=f'''