mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Allow controlling where on the remote computer the ssh kitten installs its data
This commit is contained in:
@@ -27,10 +27,13 @@ to SSH to connect to it.
|
||||
'''
|
||||
)
|
||||
|
||||
opt('+env', '',
|
||||
option_type='env',
|
||||
add_to_default=False,
|
||||
long_text='''
|
||||
opt('remote_dir', '.local/share/kitty-ssh-kitten', long_text='''
|
||||
The location on the remote computer where the files needed for this kitten
|
||||
are installed. The location is relative to the HOME directory.
|
||||
'''
|
||||
)
|
||||
|
||||
opt('+env', '', option_type='env', add_to_default=False, long_text='''
|
||||
Specify environment variables to set on the remote host. Note that
|
||||
environment variables can refer to each other, so if you use::
|
||||
|
||||
@@ -41,8 +44,5 @@ The value of MYVAR2 will be :code:`a/<path to home directory>/b`. Using
|
||||
:code:`VAR=` will set it to the empty string and using just :code:`VAR`
|
||||
will delete the variable from the child process' environment. The definitions
|
||||
are processed alphabetically.
|
||||
'''
|
||||
)
|
||||
|
||||
|
||||
''')
|
||||
egr() # }}}
|
||||
|
||||
@@ -14,6 +14,9 @@ class Parser:
|
||||
def hostname(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
hostname(val, ans)
|
||||
|
||||
def remote_dir(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['remote_dir'] = str(val)
|
||||
|
||||
|
||||
def create_result_dict() -> typing.Dict[str, typing.Any]:
|
||||
return {
|
||||
|
||||
@@ -4,11 +4,12 @@ import typing
|
||||
|
||||
|
||||
option_names = ( # {{{
|
||||
'env', 'hostname') # }}}
|
||||
'env', 'hostname', 'remote_dir') # }}}
|
||||
|
||||
|
||||
class Options:
|
||||
hostname: str = '*'
|
||||
remote_dir: str = '.local/share/kitty-ssh-kitten'
|
||||
env: typing.Dict[str, str] = {}
|
||||
config_paths: typing.Tuple[str, ...] = ()
|
||||
config_overrides: typing.Tuple[str, ...] = ()
|
||||
|
||||
Reference in New Issue
Block a user