Pretty print known paths
This commit is contained in:
parent
dbaa732ae4
commit
ea8c0c0b4a
13
bin/qw
13
bin/qw
@ -20,6 +20,19 @@ opts = OptionParser.new do |opts|
|
|||||||
@editor = editor
|
@editor = editor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
opts.separator "Additional Commands"
|
||||||
|
|
||||||
|
opts.on("--paths", "Prints all repositories and their paths") do |editor|
|
||||||
|
@qwandry.repositories.each do |label, entries|
|
||||||
|
puts label
|
||||||
|
entries.each do |repo|
|
||||||
|
puts "\t#{repo.path} (#{repo.class.to_s.split('::').last})"
|
||||||
|
end
|
||||||
|
puts ""
|
||||||
|
end
|
||||||
|
exit(0)
|
||||||
|
end
|
||||||
|
|
||||||
opts.on_tail("-h", "--help", "Show this message") do
|
opts.on_tail("-h", "--help", "Show this message") do
|
||||||
puts opts
|
puts opts
|
||||||
exit
|
exit
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
module Qwandry
|
module Qwandry
|
||||||
class Repository
|
class Repository
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
attr_reader :path
|
||||||
|
|
||||||
def initialize(name, path)
|
def initialize(name, path)
|
||||||
@name = name
|
@name = name
|
||||||
|
Loading…
Reference in New Issue
Block a user