From 4f27fb4c11d2bea3ce610026ab50b9c8ec2c0719 Mon Sep 17 00:00:00 2001 From: robjloranger Date: Fri, 30 Mar 2018 16:42:17 -0700 Subject: [PATCH 1/2] fix for fish shell command concatenation --- plugin/rspec.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/rspec.vim b/plugin/rspec.vim index 34f7372..08a02a9 100644 --- a/plugin/rspec.vim +++ b/plugin/rspec.vim @@ -1,5 +1,7 @@ let s:plugin_path = expand(":p:h:h") let s:default_command = "rspec {spec}" +let s:fish_and = "; and " +let s:bash_and = " && " let s:force_gui = 0 if !exists("g:rspec_runner") @@ -69,7 +71,11 @@ function! s:RspecCommandProvided() endfunction function! s:DefaultTerminalCommand() - return "!" . s:ClearCommand() . " && echo " . s:default_command . " && " . s:default_command + if $SHELL =~ "fish" + return "!" . s:ClearCommand() . s:fish_and . "echo " . s:default_command . s:fish_and . s:default_command + else + return "!" . s:ClearCommand() . s:bash_and . "echo " . s:default_command . s:bash_and . s:default_command + endif endfunction function! s:CurrentFilePath() From 1f4e34bb80a4423fa83710ee90ec19ca6f6facd4 Mon Sep 17 00:00:00 2001 From: robjloranger Date: Fri, 30 Mar 2018 16:51:23 -0700 Subject: [PATCH 2/2] update README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fa41df4..4955204 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ Plugin 'thoughtbot/vim-rspec' If using zsh on OS X it may be necessary to move `/etc/zshenv` to `/etc/zshrc`. +If using fish shell it is necessary to set the `$SHELL` environment variable if not set. +eg: `set -Ux SHELL /usr/bin/fish` + ## Configuration ### Key mappings