diff options
Diffstat (limited to 'lib/leap_cli')
-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 |