thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
656 stars 108 forks source link

fix for fish shell command concatenation #132

Closed ghost closed 5 years ago

ghost commented 6 years ago

In fish shell the operator used to string subsequent commands together is not the same as bash. In bash it is && but in fish it is ; and. This patch makes use of the $SHELL environment variable to check if fish is being used.

I would prefer a method to check which shell vim is currently running in but had no luck and was forced to use the user's preferred shell. At least this will default to using the existing bash syntax and Fish shell users may set the $SHELL environment variable if not set.

ghost commented 6 years ago

I just noticed there is already a similar pull request #126, this is slightly more elegant as it checks for a partial match in the shell environment variable instead of assuming a fixed depth path.