Skip to content

Commit

Permalink
fix tddium autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Jun 26, 2014
1 parent aed4579 commit 271fae2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bash/tddium_autocomplete.rb
Expand Up @@ -9,7 +9,7 @@ def available_tasks
task_lines = `tddium --help`.split("\n")
inside_tasks = false
task_lines.map do |line|
inside_tasks = true and next if line == "Tasks:"
inside_tasks = true and next if line == "Commands:"
inside_tasks = false and next if inside_tasks and line =~ /^\S/
line.strip.split(/\s+/)[1] if inside_tasks
end.compact
Expand All @@ -30,5 +30,5 @@ def cache(file)
exit 0 unless /^tddium\b/ =~ ENV["COMP_LINE"]

require "tddium/version"
tasks = cache("~/.autocomplete-cache/tddium-#{TddiumVersion::VERSION}"){ available_tasks }
tasks = cache("~/.autocomplete-cache/tddium-#{Tddium::VERSION}"){ available_tasks }
puts tasks.grep(/^#{$'.strip}/)

0 comments on commit 271fae2

Please sign in to comment.