about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-20 10:36:02 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-20 10:54:58 +0200
commitfc5fa629513d804dee5371f85acc4c4558e699a1 (patch)
tree02d725b4e5274fff122deae4ca67c1e5ad700dc0 /src/command
parentaef74f90ece0d71a981312372e9a10df64e7035c (diff)
downloadprofani-tty-fc5fa629513d804dee5371f85acc4c4558e699a1.tar.gz
Create call_external() helper function
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_funcs.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 9a00bc2f..d0f97810 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -8871,15 +8871,7 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
             return TRUE;
         }
 
-        //TODO: make function. see src/xmpp/avatar.c
-        GString *cmd = g_string_new("");
-
-        g_string_append_printf(cmd, "%s %s > /dev/null 2>&1", "xdg-open", args[0]);
-        cons_show("Calling: %s", cmd->str);
-        FILE *stream = popen(cmd->str, "r");
-
-        pclose(stream);
-        g_string_free(cmd, TRUE);
+        call_external("xdg-open", args[0]);
     } else {
         cons_show("urlopen not supported in this window");
     }