Sort by filename instead of the default first column

[Fixes 6336]
unstable
James Lee 2012-02-02 12:10:27 -07:00
parent b347418f90
commit cd0a806a06
1 changed files with 3 additions and 1 deletions

View File

@ -307,6 +307,7 @@ class Console::CommandDispatcher::Stdapi::Fs
path = args[0] || client.fs.dir.getwd
tbl = Rex::Ui::Text::Table.new(
'Header' => "Listing: #{path}",
'SortIndex' => 4,
'Columns' =>
[
'Mode',
@ -319,7 +320,8 @@ class Console::CommandDispatcher::Stdapi::Fs
items = 0
# Enumerate each item...
client.fs.dir.entries_with_info(path).sort { |a,b| a['FileName'] <=> b['FileName'] }.each { |p|
# No need to sort as Table will do it for us
client.fs.dir.entries_with_info(path).each { |p|
tbl <<
[