lib/cnote.rb in cnote-0.1.3 vs lib/cnote.rb in cnote-0.2.0
- old
+ new
@@ -2,9 +2,12 @@
require "cnote/config"
require "cnote/notes"
require "cnote/version"
config = Config.new("~/.cnote.yaml")
-
-# Start REPL
notes = Notes.new(config)
-notes.await_command("\nWelcome to CNote! Type #{'help'.white} or #{'h'.white} to see a list of available commands.")
+
+if ARGV[0]
+ notes.run_command(ARGV.shift, ARGV)
+else
+ notes.await_command("\nWelcome to CNote! Type #{'help'.white} or #{'h'.white} to see a list of available commands.")
+end
\ No newline at end of file