preservim / vimux

easily interact with tmux from vim
MIT License
2.19k stars 159 forks source link

:call VimuxRunCommandInDir doesn't support fish shell #148

Closed nukr closed 2 months ago

nukr commented 7 years ago

When I :call VimuxRunCommandInDir("go test", 0) I got result

Illegal command name '(cd '/Users/nukr/workspace/gocode/src/github.com/nukr/street_name/pkg/types' && ls )'

Because fish shell can not use () surround command, and use command; and command instead of command && command

How can I fix it?

alerque commented 3 years ago

I don't use Fish myself and probably won't be working on this, but if somebody else wants to contribute a configuration setting for Fish support that enables alternate shell syntax for any of the bits that need adapting I'd be happy to facilitate merging it.

reshen commented 5 months ago

A simple work around that works with fish is to use VimuxRunCommand and change to the directory of the current file. In the example below, I also suffix the total command with fish's prevd command to return to the previous working directory after the command finishes:

   map <Leader>rb :call VimuxRunCommand("cd " . expand("%:p:h") . " && DoSomethingInteresting ; prevd")