Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim-rspec sending g:rspec_command command to shell rather than vim #61

Closed
geoffharcourt opened this issue Jul 27, 2014 · 11 comments
Closed

Comments

@geoffharcourt
Copy link

I updated vim-rspec this weekend (since commit 4c637bd) and have noticed what seems to be a regression. I am using Dispatch, but the problem can be replicated without Dispatch.

I noticed the issue when I would attempt to run specs, and would get this output

Dispatch rspec spec
zsh:1: command not found: Dispatch

shell returned 127

Press ENTER or type command to continue

Dispatch rspec {spec} (my complete value for g:rspec_command was getting returned as an invalid zsh command. If I change my g:rspec_command to just rspec {spec} (with no exclamation point before the rspec command), then vim-rspec executes the specs.

It looks like vim-rspec is just passing whatever g:rspec_command is on to the shell rather than to vim. If I attempt to use the default and not specify a custom command, vim-rspec works as expected. I'm not sure if after this new change to allow simultaneous definitions of g:rspec_command and g:rspec_runner in 4c637bd that there's a new configuration that wasn't reflected in the docs or not.

@geoffharcourt
Copy link
Author

One more item: if I rewind to the previous commit (94a256b), the problem is resolved.

@kbredemeier
Copy link

Same problem for me using vim-slime

@gylaz
Copy link
Contributor

gylaz commented Jul 28, 2014

I've reverted 4c637bd as I realized that it wasn't thought through well enough.

@gylaz gylaz closed this as completed Jul 28, 2014
@geoffharcourt
Copy link
Author

@gylaz, thanks very much for the quick fix.

@chibicode
Copy link

👍

@neektza
Copy link

neektza commented Sep 15, 2014

This is still happening for me when using vim-rspec and vim-dispatch together.

In my .vimrc I have:

let g:rspec_command = "Dispatch rspec {spec}"
let g:rspec_runner = "os_x_iterm"

The whole command (Dispatch rspec spec/models/users_spec.rb) gets dumped to the console when it should be run by Vim instead.

When using only vim-dispatch (Dispatch rspec %) everything works fine.

@tomaszwojcik
Copy link

Same issue as @neektza. Whole Dispatch command is send to the console on MacVim GUI, however on terminal Vim it works fine.

@ainformatico
Copy link

Same issue here.

@keith
Copy link
Contributor

keith commented Dec 18, 2014

I was able to reproduce this error with the commands mentioned by @neektza running in MacVim. The command being created is:

!/path/to/vim-rspec/bin/os_x_iterm 'Dispatch rspec {spec}'

We should be letting dispatch handle all of this. Then the command would just be:

Dispatch rspec {spec}

@gylaz
Copy link
Contributor

gylaz commented Dec 18, 2014

I've been thinking about this, and I think a reasonable solution is not to default a g:rspec_runner, but to force the user to set it if they want to use one. This would allow for the use case of this issue.

@kurioscreative
Copy link

Was there ever a resolution of this issue? I can confirm that it is still happening for me on Macvim and iTerm2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants