-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to add additional identities via the command line #413
base: master
Are you sure you want to change the base?
Add the ability to add additional identities via the command line #413
Conversation
502e578
to
eab0362
Compare
@@ -114,6 +114,10 @@ def create_agent_parser(device_type): | |||
|
|||
p.add_argument('identity', type=_to_unicode, default=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be simpler to add nargs='+'
to the existing identity
argument:
p.add_argument('identity', type=_to_unicode, default=None, nargs='+',
help='proto://[user@]host[:port][/path]')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me test how that works.
That conflicts with the other nargs argument at trezor-agent/libagent/ssh/__init__.py Line 121 in eab0362
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-c', action='store_true')
parser.add_argument('foo', nargs='+')
parser.add_argument('bar', nargs='*', metavar='ARGUMENT')
print(parser.parse_args('-c c a b -- 1 2 3'.split())) The output Namespace(c=True, foo=['c', 'a', 'b', '1', '2', '3'], bar=[]) |
You're right - it won't work :( |
Yes, I can. This was more for convenience than anything else. onlykey-agent <(echo "<[email protected]|ed25519>";echo "<[email protected]|ed25519>") --shell Or creating the file ahead of time. The file approach also works. |
No description provided.