Open Konfekt opened 9 years ago
would invoke the first case of the above if clause
@Konfekt I can make the condition more precise so that it correctly falls through to the second clause.
still leaves the unnecessary cd command.
So it works, except for an unnecessary cd
?
Perhaps the way to go is to allow the user to specify all the parameters passed
Configuration defeats the purpose of the plugin :) g:gtfo#terminals
was added for desperate edge cases.
Yes, it works without cd
, but this is a user defined batch file.
gtfo`s utility lies in providing defaults for spawning a terminal or file manager in any os from VIM.
However if the user decides to spawn in a particular OS its customized terminal or file manager, gtfo should not interfere. This is why, in case the user provides such a customization, the check for bash
is not sufficient.
I think better would be do add an variable isUserTermpath
that keeps track if the termpath
was provided by the user or not. In this case, just
silent exe '!start '.s:termpath
and allow for a wildcard in the user customized termpath
to let the user decide where in the string of arguments passed to the shell the file path actually has to go. Everything else is out of scope.
If this sounds sane, I'd offer to implement this in a pull request.
Dear Justin, the lines
are insufficient to deal with user customized termpath variables.
For example, I wanted gtfo to set up such that it uses mintty of msys2 and
would invoke the first case of the above if clause but the above command already takes care of the
cd
command. Wrapping the above command in a bat, so that gtfo does not detect thebash
string, still leaves the unnecessary cd command.Perhaps the way to go is to allow the user to specify all the parameters passed to the terminal AND their order by a wildcards for the path such as
@PATH
.That is, something like
or