lib/synvert/cli.rb in synvert-0.1.0 vs lib/synvert/cli.rb in synvert-0.1.1
- old
+ new
@@ -114,13 +114,17 @@
end
end
# List and print all available rewriters.
def list_available_rewriters
- Core::Rewriter.availables.each do |rewriter|
- print rewriter.name.to_s + " "
+ if Core::Rewriter.availables.empty?
+ puts "There is no snippet under ~/.synvert, please run `synvert --sync` to fetch snippets."
+ else
+ Core::Rewriter.availables.each do |rewriter|
+ print rewriter.name.to_s + " "
+ end
+ puts
end
- puts
end
# Query and print available rewriters.
def query_available_rewriters
Core::Rewriter.availables.each do |rewriter|