From 7eea02992c201cff6055933fd95fdea3a5302107 Mon Sep 17 00:00:00 2001 From: cage Date: Wed, 10 Feb 2021 18:02:06 +0100 Subject: [PATCH] - respected arguments of a program when opening a link. --- src/os-utils.lisp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/os-utils.lisp b/src/os-utils.lisp index 02089d9..f6e3f4e 100644 --- a/src/os-utils.lisp +++ b/src/os-utils.lisp @@ -119,10 +119,14 @@ :output t :error t)))) -(defun open-link-with-program (program link) - (sb-ext:run-program program - (list link) - :search t - :wait nil - :output nil - :error :output)) +(defun open-link-with-program (program-and-args link) + (let* ((command-line-splitted (text-utils:split-words program-and-args)) + (program (first command-line-splitted)) + (args (append (rest command-line-splitted) + (list link)))) + (sb-ext:run-program program + args + :search t + :wait nil + :output nil + :error :output)))