Add some docs for the ssh kitten

This commit is contained in:
Kovid Goyal
2022-03-03 22:31:11 +05:30
parent 1c558be524
commit f1ce8c0e8a
7 changed files with 104 additions and 2 deletions

View File

@@ -357,3 +357,6 @@ if __name__ == '__main__':
main(sys.argv)
elif __name__ == '__completer__':
setattr(sys, 'kitten_completer', complete)
elif __name__ == '__conf__':
from .options.definition import definition
sys.options_definition = definition # type: ignore

View File

@@ -7,6 +7,12 @@
from kitty.conf.types import Definition
copy_message = '''\
Copy files and directories from the local computer to the remote one. The
specified files are assumed to be relative to the HOME directory and copied
to the HOME on the server. Directories are copied recursively. If absolute paths
are used, they are copied as is.'''
definition = Definition(
'kittens.ssh',
)
@@ -26,7 +32,26 @@ against is the hostname used by the remote computer, not the name you pass
to SSH to connect to it.
''')
opt('+copy', '', option_type='copy', add_to_default=False, long_text='''
opt('+copy', '', option_type='copy', add_to_default=False, long_text=f'''
{copy_message} For example::
copy .vimrc .zshrc .config/some-dir
If a file should be copied to some other destination on the remote machine,
use :code:`--dest`::
copy --dest some-other-name some-file
Glob patterns can be specified to copy multiple files, with :code:`--glob`::
copy --glob images/*.png
Files can be excluded when copying with :code:`--exclude`::
copy --glob --exclude *.jpg --exclude *.bmp images/*
Files whose remote name matches the exclude pattern will not be copied.
For more details, see :ref:`ssh_copy_command`.
''')
opt('+env', '', option_type='env', add_to_default=False, long_text='''