Don't use suffix flag for zsh compadd command

* Fixes an issue where tab completing specs that start with the same
words(s) makes tab completion freak out and stop working.

* The con is that we'll see "_spec.rb" in the output, like:

```zsh
$ rspec spec/models/
models/calendar_spec.rb
models/event_closer_spec.rb
...
```
This commit is contained in:
Greg Lazarev 2013-04-19 12:12:42 -07:00
parent 49f16b16c3
commit 59bdc8d237

View file

@ -1,3 +1,3 @@
#compdef rspec
compadd -P spec/ -S _spec.rb `ls spec/**/*_spec.rb | sed -E "s/spec\/|_spec\.rb//g"`
compadd -P spec/ `ls spec/**/*_spec.rb | sed -E "s/spec\///g"`