Permalink
Browse files

User can choose editor to create a new post (default: mate). Usage: e…

…xport EDITOR=vim; _bin/newpost 'Welcome'
  • Loading branch information...
1 parent 2ab14fe commit 5fb7706cbf1be3ca86043b97814fb6fcb1b052fd @rondy committed Apr 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 _bin/newpost
View
@@ -26,5 +26,6 @@ File.open(post, 'w') do |f|
f << header
end
-system("mate", "-a", post)
+editor = ENV['EDITOR'] || "mate"
+system(editor, post)
exit(0)

0 comments on commit 5fb7706

Please sign in to comment.