-l
This commit is contained in:
parent
aeb4b08c6c
commit
57987dc445
1 changed files with 2 additions and 2 deletions
4
ls.rb
4
ls.rb
|
@ -4,7 +4,7 @@ require 'optparse'
|
||||||
require 'etc'
|
require 'etc'
|
||||||
|
|
||||||
COLUMNS = 3
|
COLUMNS = 3
|
||||||
SIZE_INDENT = 3
|
MARGIN = 3
|
||||||
|
|
||||||
def run
|
def run
|
||||||
listed_filenames = list_filenames
|
listed_filenames = list_filenames
|
||||||
|
@ -84,7 +84,7 @@ def file_type(file_stat)
|
||||||
end
|
end
|
||||||
|
|
||||||
def file_size(filenames)
|
def file_size(filenames)
|
||||||
filenames.map { |file| File.size(file) }.max.to_s.length
|
filenames.map { |file| File.size(file) }.max.to_s.length + MARGIN
|
||||||
end
|
end
|
||||||
|
|
||||||
def timestamp(file_stat)
|
def timestamp(file_stat)
|
||||||
|
|
Loading…
Reference in a new issue