Skip to content

Commit

Permalink
List command
Browse files Browse the repository at this point in the history
  • Loading branch information
castwide committed Nov 5, 2023
1 parent 69d5221 commit dbf02b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/solargraph/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ def scan
puts "Scanned #{directory} (#{api_map.pins.length} pins) in #{time.real} seconds."
end

desc 'list', 'List the files in the workspace and the total count'
option :count, type: :boolean, aliases: :c, desc: 'Display the file count only', default: false
option :directory, type: :string, aliases: :d, desc: 'The directory to read', default: '.'
def list
workspace = Solargraph::Workspace.new(options[:directory])
unless options[:count]
workspace.filenames.each { |f| puts f }
end
puts "#{workspace.filenames.length} files total."
end

desc 'bundle', 'Generate documentation for bundled gems [deprecated]'
long_desc %(
The `bundle` command is deprecated. Solargraph currently uses RBS instead.
Expand Down

0 comments on commit dbf02b9

Please sign in to comment.