From 38a5b3603841c8f6d649014ab0e52c3236177928 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 14 Mar 2017 23:04:55 -0700 Subject: [PATCH] =?UTF-8?q?Add=20support=20for=20fish=20(shell)=20?= =?UTF-8?q?=F0=9F=90=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/rspec.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/rspec.vim b/plugin/rspec.vim index 34f7372..a1f0c3a 100644 --- a/plugin/rspec.vim +++ b/plugin/rspec.vim @@ -69,7 +69,7 @@ function! s:RspecCommandProvided() endfunction function! s:DefaultTerminalCommand() - return "!" . s:ClearCommand() . " && echo " . s:default_command . " && " . s:default_command + return "!" . s:ClearCommand() . s:AndCommand() . "echo " . s:default_command . s:AndCommand() . s:default_command endfunction function! s:CurrentFilePath() @@ -88,6 +88,14 @@ function! s:ClearCommand() endif endfunction +function! s:AndCommand() + if &shell[-4:] == "fish" + return "; and " + else + return " && " + endif +endfunction + function! s:IsMacGui() return s:force_gui || (has("gui_running") && has("gui_macvim")) endfunction