mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 19:21:38 +02:00
Make using kitty askpass optional
This commit is contained in:
@@ -107,4 +107,11 @@ opt('login_shell', '', long_text='''
|
||||
The login shell to execute on the remote host. By default, the remote user account's
|
||||
login shell is used.''')
|
||||
|
||||
opt('askpass', 'unless-set', long_text='''
|
||||
Control the program SSH uses to ask for passwords or confirmation of host keys etc.
|
||||
The default is to use kitty's native askpass, unless the SSH_ASKPASS environment variable
|
||||
is set. Set it to :code:`ssh` to not interfere with the normal ssh askpass mechanism at all,
|
||||
which typically means that ssh will prompt at the terminal. Set it to :code:`native` to always use
|
||||
kitty's native, built-in askpass implementation.
|
||||
''')
|
||||
egr() # }}}
|
||||
|
||||
@@ -7,6 +7,9 @@ from kitty.conf.utils import merge_dicts, to_bool
|
||||
|
||||
class Parser:
|
||||
|
||||
def askpass(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['askpass'] = str(val)
|
||||
|
||||
def copy(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
for k, v in copy(val, ans["copy"]):
|
||||
ans["copy"][k] = v
|
||||
|
||||
@@ -5,6 +5,7 @@ import kittens.ssh.copy
|
||||
|
||||
|
||||
option_names = ( # {{{
|
||||
'askpass',
|
||||
'copy',
|
||||
'cwd',
|
||||
'env',
|
||||
@@ -17,6 +18,7 @@ option_names = ( # {{{
|
||||
|
||||
|
||||
class Options:
|
||||
askpass: str = 'unless-set'
|
||||
cwd: str = ''
|
||||
hostname: str = '*'
|
||||
interpreter: str = 'sh'
|
||||
|
||||
Reference in New Issue
Block a user