lib/command/folder.rb in narou-3.7.1 vs lib/command/folder.rb in narou-3.7.2
- old
+ new
@@ -21,20 +21,25 @@
Examples:
narou folder n9669bk
narou folder musyoku
narou folder 0
narou f 0
+
+ Options:
EOS
+ @opt.on("-n", "--no-open", "フォルダを開かずにパスだけ表示する") {
+ @options["no-open"] = true
+ }
end
def execute(argv)
super
display_help! if argv.empty?
tagname_to_ids(argv)
argv.each do |target|
dir = Downloader.get_novel_data_dir_by_target(target)
if dir
- Helper.open_directory(dir)
+ Helper.open_directory(dir) unless @options["no-open"]
puts dir
else
error "#{target} は存在しません"
end
end