|
51 | 51 | TOOLS_SCRIPT_PATH = "#{USER_DIR}/bin/npTools".freeze |
52 | 52 | STATS_SCRIPT_PATH = "#{USER_DIR}/bin/npStats".freeze |
53 | 53 | NP_SUMMARIES_DIR = "#{USER_DIR}/Dropbox/NPSummaries".freeze |
| 54 | +TODAYS_DATE = Date.today # defaults to %Y-%m-%d format. Can't work out why this needs to be a 'constant' to work -- something about visibility, I suppose |
54 | 55 | SUMMARY_FILENAME = TODAYS_DATE.strftime('%Y%m%d') + '_notes_summary.csv' |
55 | 56 |
|
56 | 57 | #---------------------------------------------------------------------------------- |
57 | 58 | # Constants & other settings |
58 | 59 | #---------------------------------------------------------------------------------- |
59 | 60 | timeNow = Time.now |
60 | | -TODAYS_DATE = Date.today # defaults to %Y-%m-%d format. Can't work out why this needs to be a 'constant' to work -- something about visibility, I suppose |
61 | 61 | DROPBOX_DIR = "#{USER_DIR}/Dropbox/Apps/NotePlan/Documents".freeze |
62 | 62 | ICLOUDDRIVE_DIR = "#{USER_DIR}/Library/Mobile Documents/iCloud~co~noteplan~NotePlan/Documents".freeze |
63 | 63 | CLOUDKIT_DIR = "#{USER_DIR}/Library/Containers/co.noteplan.NotePlan3/Data/Library/Application Support/co.noteplan.NotePlan3".freeze |
@@ -823,6 +823,9 @@ def white_match(needle, haystack_array) |
823 | 823 | print "\nCommands: re-read & show (a)ll, (e)dit note, s(h)ow stats, people (l)ist, (p)roject+goal lists,".colorize(InstructionColour) |
824 | 824 | print "\n(q)uit, (r)eview next, (s)ave summary, run (t)ools, re(v)iew list, (w)aiting tasks > ".colorize(InstructionColour) |
825 | 825 | ARGV.clear # required for 'gets' in the next line not to barf if an ARGV was supplied |
826 | | - input = gets.chomp! # get input from command line, and take off LF |
| 826 | + loop do |
| 827 | + input = gets.chomp # get input from command line, and take off LF |
| 828 | + break if !input.empty? |
| 829 | + end |
827 | 830 | verb = input[0].downcase |
828 | 831 | end |
0 commit comments