Code Monkey home page Code Monkey logo

Comments (11)

tpope avatar tpope commented on May 30, 2024

Does it work if you do set shell=/bin/bash?

from vim-dispatch.

rainerborene avatar rainerborene commented on May 30, 2024

No. Here's my vimrc.

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

Oh, seems that's part of the problem actually. Dispatch sees your Vim is configured to use bash, but doesn't realize tmux isn't.

Do you have csh installed? If so, try changing /bin/bash to /bin/csh (or better, /bin/tcsh) in your vimrc and see if it works. If it does, it's just a matter of making dispatch correctly figure out that tmux won't be using a bourne shell.

from vim-dispatch.

rainerborene avatar rainerborene commented on May 30, 2024

I've changed to both shells but got the following message:

Screen Shot 2013-04-02 at 1 12 04 PM

from vim-dispatch.

rainerborene avatar rainerborene commented on May 30, 2024

Actually It works. I can't change the shell option after opened vim. thanks

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

Reopening because forcing csh is kind of gross (and it only works because that changes 'shellpipe', which dispatch.vim uses in a conditional). But at least there's a workaround, so I can drop the priority.

from vim-dispatch.

rainerborene avatar rainerborene commented on May 30, 2024

Now even using /bin/csh or /bin/tcsh shell isn't working.
https://gist.github.com/rainerborene/3ccea18dc9ad6b2acea0

from vim-dispatch.

terlar avatar terlar commented on May 30, 2024

A temporary fix for those running fish-shell:

 function! dispatch#prepare_make(request, ...) abort
-  let exec = 'echo $$ > ' . a:request.file . '.pid; '
+  let exec = 'echo %self > ' . a:request.file . '.pid; '
   if executable('perl')
     let exec .= 'perl -e "select(undef,undef,undef,0.1)"; '
   else
@@ -100,12 +100,7 @@ function! dispatch#prepare_make(request, ...) abort
   let after = 'rm -f ' . a:request.file . '.pid; ' .
         \ 'touch ' . a:request.file . '.complete; ' .
         \ dispatch#callback(a:request)
-  if &shellpipe =~# '2>&1'
-    return 'trap ' . shellescape(after) . ' EXIT INT TERM; ' . exec
-  else
-    " csh
-    return exec . '; ' . after
-  endif
+  return exec . '; ' . after
 endfunction

Maybe there is some system command to get the PID instead? To not make it POSIX dependent.

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

Try the isolate branch.

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

Oh, and make sure you switch back to set shell=/bin/bash.

from vim-dispatch.

rainerborene avatar rainerborene commented on May 30, 2024

@tpope It works.

from vim-dispatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.