summaryrefslogtreecommitdiff
path: root/lib/chef/knife/list.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/list.rb')
-rw-r--r--lib/chef/knife/list.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/chef/knife/list.rb b/lib/chef/knife/list.rb
index 263b0e7431..3d1583b270 100644
--- a/lib/chef/knife/list.rb
+++ b/lib/chef/knife/list.rb
@@ -1,4 +1,4 @@
-require 'chef/chef_fs/knife'
+require "chef/chef_fs/knife"
class Chef
class Knife
@@ -8,33 +8,33 @@ class Chef
category "path-based"
deps do
- require 'chef/chef_fs/file_system'
- require 'highline'
+ require "chef/chef_fs/file_system"
+ require "highline"
end
option :recursive,
- :short => '-R',
+ :short => "-R",
:boolean => true,
:description => "List directories recursively"
option :bare_directories,
- :short => '-d',
+ :short => "-d",
:boolean => true,
:description => "When directories match the pattern, do not show the directories' children"
option :local,
- :long => '--local',
+ :long => "--local",
:boolean => true,
:description => "List local directory instead of remote"
option :flat,
- :short => '-f',
- :long => '--flat',
+ :short => "-f",
+ :long => "--flat",
:boolean => true,
:description => "Show a list of filenames rather than the prettified ls-like output normally produced"
option :one_column,
- :short => '-1',
+ :short => "-1",
:boolean => true,
:description => "Show only one column of results"
option :trailing_slashes,
- :short => '-p',
+ :short => "-p",
:boolean => true,
:description => "Show trailing slashes after directories"
@@ -130,17 +130,17 @@ class Chef
else
columns = HighLine::SystemExtensions.terminal_size[0]
end
- current_line = ''
+ current_line = ""
results.each do |result|
if current_line.length > 0 && current_line.length + print_space > columns
output current_line.rstrip
- current_line = ''
+ current_line = ""
end
if current_line.length == 0
current_line << indent
end
current_line << result
- current_line << (' ' * (print_space - result.length))
+ current_line << (" " * (print_space - result.length))
end
output current_line.rstrip if current_line.length > 0
end