if you can help me more, i am very new and i need to finish it today.
get current opened file path into a variable and run a shell script with that path in as arguments.
please let me know if below code is correct way..
thank you very much.
_command copy_fileid_to_clipboard() name_info(',')
{
_str buf_name=p_buf_name;
int temp_view_id;
int orig_view_id=_create_temp_view(temp_view_id);
// say('copy_filename_to_clipboard temp_view_id='temp_view_id);
p_view_id=temp_view_id;
fileid=buf_name;
_insert_text(buf_name);
copy_to_clipboard();
p_view_id=orig_view_id;
_delete_temp_view(temp_view_id);
message('Filename: ' fileid);
concur_command('\\vineet\pc1.sh 'fieldid,false,true,false, false);
}
// switchbuf_cd: change current working directory to current file directory
// change current directory to that of the current buffer
_command switchbuf_cd()
{
_str path=strip_filename(p_buf_name,'n');
int status=chdir(path,1);
if (!status) {
message('Current working is 'path);
}
else
message ('get_message(status)');
}
Thanks
Vineet