Skip to content

Instantly share code, notes, and snippets.

@jferris
Created December 3, 2009 18:01
Show Gist options
  • Select an option

  • Save jferris/248371 to your computer and use it in GitHub Desktop.

Select an option

Save jferris/248371 to your computer and use it in GitHub Desktop.
# autocompletion for cuc
_cucumber_features() {
compadd `ls features/**/*.feature | sed "s/features\/\(.*\).feature/\1/"`
}
compdef _cucumber_features cuc
#!/usr/bin/env ruby
args = ARGV.map do |arg|
name, line = *arg.split(':')
line = ":#{line}" if line
"features/#{name}.feature#{line}"
end
script = if File.executable?('script/cucumber')
'script/cucumber'
else
'cucumber'
end
exec(script, *args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment