exe/githelp in githelp-0.3.2 vs exe/githelp in githelp-0.3.3
- old
+ new
@@ -141,11 +141,14 @@
if res =~ /^\#\[(\d+)\]/
cmd = list[$1.to_i][1]
else
cmd = res.sub(/^\s*/,'')
end
- puts cmd
- system cmd
+ print "「#{cmd.chomp}」 を実行しますか? "
+ ans = gets
+ if ans =~ /^y/i || ans == "\n"
+ system cmd
+ end
end
else
res = IO.popen(pager, "w") {|io|
list.each_with_index { |entry,ind|
io.puts "#[#{ind}] #{entry[0]}"