mirror of
https://gittea.dev/nova/th.git
synced 2025-10-21 18:30:15 -04:00
yank_name now implemented
This commit is contained in:
@@ -703,6 +703,27 @@ void cmd_on_selected(int passes, int index){
|
||||
free(file_str);
|
||||
}
|
||||
}
|
||||
void yank_text(int passes, int index){
|
||||
(void)passes;
|
||||
char *cmd;
|
||||
if (strncmp((char*)key_binding[index].black_magic, "path", 4) == 0) {
|
||||
char *path=getcwd(NULL, 0);
|
||||
cmd = concat("echo \"", path);
|
||||
cmd = concat(cmd, "/");
|
||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||
cmd = concat(cmd, "\" | ");
|
||||
cmd = concat(cmd, clipboard_cmd);
|
||||
free(path);
|
||||
} else {
|
||||
cmd = concat("echo \"", mid_content[selected_file_current].file_name);
|
||||
cmd = concat(cmd, "\" | ");
|
||||
cmd = concat(cmd, clipboard_cmd);
|
||||
}
|
||||
if (system(cmd) == -1) {
|
||||
/*do nothing*/
|
||||
}
|
||||
free(cmd);
|
||||
}
|
||||
void yank_file(int passes, int index){
|
||||
(void)passes;
|
||||
|
||||
|
Reference in New Issue
Block a user