From c8f012b431d418277e71dedd3374c97bdcb017e9 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 19 Jul 2009 23:23:15 +0200 Subject: display owner and group next to rights --- code/draw.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'code') diff --git a/code/draw.rb b/code/draw.rb index e8a1ccdc..0686c815 100644 --- a/code/draw.rb +++ b/code/draw.rb @@ -1,4 +1,5 @@ require 'socket' +require 'etc' module Fm DONT_PREVIEW_THESE_FILES = /\.(avi|[mj]pe?g|iso|mp\d|og[gmv]|wm[av]|mkv|torrent|so|class|flv|png|bmp|vob|divx?)$/i @@ -292,9 +293,10 @@ module Fm when 't' puti btm, "Toggle (h)idden_files (d)irs_first (f)ilepreview (p)review (w)idebar (c)d (!)confirm" else + owner = "#{Etc.getpwuid(cf.stat.uid).name}:#{Etc.getgrgid(cf.stat.gid).name}" attr_set(Color.base) attr_set(Color.info) - puti btm, "#@buffer #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free, #{@pwd.size}, #{@pwd.pos+1} ".rjust(cols) + puti btm, "#@buffer #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free ".rjust(cols) more = '' if cf.symlink? more = "#{cf.readlink.ascii_only_if(Option.ascii_only)}" @@ -305,7 +307,7 @@ module Fm puti btm, left attr_set(cf.writable? ? Color.allowed : Color.denied) - second = "#{cf.rights} " + second = "#{cf.rights} #{owner} " puti btm, left.size, second if more attr_set(cf.exists? ? Color.allowed : Color.denied) -- cgit 1.4.1-2-gfad0