lib/standup_md/cli.rb in standup_md-0.2.0 vs lib/standup_md/cli.rb in standup_md-0.2.1

- old
+ new

@@ -77,13 +77,13 @@ # variables are checked. If none of the above are set, defaults to +vim+. # # @return [String] The editor def editor @editor ||= - if preferences.key?('editor') - echo "Editor set to [#{preferences.key('editor')}] via preferences" - preferences.delete('editor') + if standup.config.key?('editor') + echo "Editor set to [#{standup.config['editor']}] via preferences" + standup.config['editor'] elsif ENV['VISUAL'] echo "Editor set to [#{ENV['VISUAL']}] (ENV['VISUAL'])" ENV['VISUAL'] elsif ENV['EDITOR'] echo "Editor set to [#{ENV['EDITOR']}] (ENV['EDITOR'])" @@ -268,10 +268,10 @@ end opts.on('-f', '--file-name-format=STRING', 'Date-formattable string to use for standup file name') do |v| prefs['file_name_format'] = v end opts.on('-e', '--editor=EDITOR', 'Editor to use for opening standup files') do |v| - prefs['editor'] = v + @editor = v end opts.on('-d', '--directory=DIRECTORY', 'The directories where standup files are located') do |v| prefs['directory'] = v end opts.on('--[no-]write', "Write current entry if it doesn't exist. Default is true") do |v|