mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
minor fix in table format
This commit is contained in:
parent
f775146ffd
commit
56b01bcc86
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ class Cli
|
||||||
i = 1
|
i = 1
|
||||||
length_total = 10
|
length_total = 10
|
||||||
data = { id: { length: 3, color: 'cyan' },
|
data = { id: { length: 3, color: 'cyan' },
|
||||||
host: { length: 9, color: 'yellow' },
|
host: { length: 9, color: 'yellow' },
|
||||||
user: { length: 7, color: 'green' },
|
user: { length: 7, color: 'green' },
|
||||||
protocol: { length: 9, color: 'white' },
|
protocol: { length: 9, color: 'white' },
|
||||||
port: { length: 5, color: 'white' },
|
port: { length: 5, color: 'white' },
|
||||||
|
@ -153,7 +153,7 @@ class Cli
|
||||||
data.each do |k, v|
|
data.each do |k, v|
|
||||||
next if k == :id or k == :otp
|
next if k == :id or k == :otp
|
||||||
|
|
||||||
v[:length] = item.send(k.to_s).length + 3 if item.send(k.to_s).to_s.length > v[:length]
|
v[:length] = item.send(k.to_s).length + 3 if item.send(k.to_s).to_s.length >= v[:length]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
data[:id][:length] = items.length.to_s.length + 2 if items.length.to_s.length > data[:id][:length]
|
data[:id][:length] = items.length.to_s.length + 2 if items.length.to_s.length > data[:id][:length]
|
||||||
|
|
Loading…
Add table
Reference in a new issue