[ditz-talk] [PATCH] Better issue_dir possibility order

Daniel Kalør daniel at kalor.dk
Tue Nov 4 05:58:33 EST 2008


When something is used as default for the --issue-dir option, it
overrides the configured issue_dir.
---
 bin/ditz |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ditz b/bin/ditz
index 886a8fd..cfb6dc5 100755
--- a/bin/ditz
+++ b/bin/ditz
@@ -39,7 +39,7 @@ See 'ditz help' for a list of commands.
 Global options are:
 EOS

-  opt :issue_dir, "Issue database dir", :default => ".ditz"
+  opt :issue_dir, "Issue database dir", :type => String
   opt :config_file, "Configuration file", :default =>
File.join(config_dir || ".", CONFIG_FN)
   opt :plugins_file, "Plugins file", :default => File.join(plugin_dir
|| ".", PLUGIN_FN)
   opt :verbose, "Verbose output", :default => false
@@ -115,7 +115,7 @@ end
 ## configure any lowline settings
 Lowline.use_editor_if_possible = config.use_editor_if_possible

-issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir)
+issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir || ".ditz")
 cmd = ARGV.shift || "todo"
 unless op.has_operation? cmd
   die "no such command: #{cmd}"
-- 
1.6.0.3


More information about the ditz-talk mailing list