This is a bit crude, but it is what I use for launching external programs
(including bash scripts). When I used to work in Win+Cygwin I also had a wrapper around the bash script but I forget why I needed that.
but remember that you can always tie specific actions to your project
(build, compile, etc), you can always add your own as well Project->Properties->Tools->New. All those commands can execute in the process window
#include "slick.sh"
static _str mytmp='/tmp/myvstmp.txt'
_command git_annotate(_str filename='') name_info(',' VSARG2_MACRO )
{
if (filename=='') {
filename=p_buf_name;
}
curr_line=p_line;
delete_file(mytmp); // make sure we dont get old file
if( file_match(mytmp,'1')==mytmp ) {
message('Tmp file delete failed! ('mytmp') change permissions and if still failing - restart vs');
return 1
}
shell('/usr/bin/git blame -s 'filename' | sed "s@^\(.\{8\}\) [^)]*) @\1 @" >'mytmp, 'p');
if( file_match(mytmp,'1')!=mytmp ) {
message('Annotate failed');
return 1
}
status=edit('-w 'mytmp);
if (status) {
message('Error opening output file for display.');
return 1
}
goto_line(curr_line+1);
// keep disk clean
p_buf_flags |= VSBUFFLAG_THROW_AWAY_CHANGES;
name("* annotate output *" filename, false);
delete_file(mytmp);
}