Class: Repos::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/repos/cli.rb

Overview

The command line interface for the repos executable.

Instance Method Summary collapse

Instance Method Details

#list(directory = '.') ⇒ Object

:nodoc:



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/repos/cli.rb', line 28

def list(directory = '.') # :nodoc:
  Repos.list(directory,
             options[:filter],
             options[:recursive]).each do |repository|
    if options[:names]
      say repository
    else
      say_git_status(Repos.clean?(repository), repository)
    end

    if options[:verbose]
      Dir.chdir repository do
        system 'git status'
        system 'git --no-pager stash list'
        puts
      end
    end
  end
end