diff options
author | elijah <elijah@riseup.net> | 2015-08-19 12:26:22 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-08-19 12:26:22 -0700 |
commit | 67e1536fa4340fc46c63ffafd2514e97939588c3 (patch) | |
tree | b6be5829b26b98bbcea84875e344684d9f5dc4e1 /lib | |
parent | ed604349a4035eed2bccefa9aa030d93ad4f6b58 (diff) |
minor: better ssh key selection for add-user
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/ssh_key.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/leap_cli/ssh_key.rb b/lib/leap_cli/ssh_key.rb index 5a7ac23..138f444 100644 --- a/lib/leap_cli/ssh_key.rb +++ b/lib/leap_cli/ssh_key.rb @@ -161,8 +161,11 @@ module LeapCli end def summary - #"%s %s %s (%s)" % [self.type, self.bits, self.fingerprint, self.filename || self.comment || ''] - "%s %s %s" % [self.type, self.bits, self.fingerprint] + if self.filename + "%s %s %s (%s)" % [self.type, self.bits, self.fingerprint, File.basename(self.filename)] + else + "%s %s %s" % [self.type, self.bits, self.fingerprint] + end end def to_s |