lib/yac.rb in yac-0.1.0 vs lib/yac.rb in yac-0.1.2

- old
+ new

@@ -22,12 +22,12 @@ when "show" then show(args[1,args.size]) when "name" then search(args[1,args.size],"name") when "content" then search(args[1,args.size],"content") when "update" then update(args[1,args.size]) when /^(add|edit)$/ then edit(args[1,args.size]) - when "help" then help - when "shell" then shell(args[1,args.size]) + when /^(help|-h|yac|--help)$/ then help + when /^(sh|shell)$/ then shell(args[1,args.size]) when "rm" then rm(args[1,args.size]) when "init" then init else show(args) end show_possible_result @@ -83,12 +83,12 @@ protected def format_file(file) @level = 0 case `file #{file}` when / PDF / - system("#{CONFIG["pdf_command"]||'evince'} #{file}") - when / image / - system("#{CONFIG["pic_command"]||'eog'} #{file}") + puts "Please Modify ~/.yacrc To Provide A Valid Command To Open PDF Document" unless system("#{CONFIG["pdf_command"]||'evince'} #{file}") + when /( image )|(\.svg)/ + puts "Please Modify ~/.yacrc To Provide A Valid Command To Open Image Document" unless system("#{CONFIG["pic_command"]||'eog'} #{file}") else File.new(file).each do |x| format_section(x) end end