diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-03-28 09:19:02 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-03-28 09:19:02 +0200 |
commit | ff0cdafd0b9e048ab82f7a363c8950cae49e6a12 (patch) | |
tree | a12684b871da7ce74e7e5f15f821015e53e8df01 /helm-external.el | |
parent | 6a29b520b61346a9bbbd6487e2bf8e0d83759405 (diff) |
Minor changes in helm-run-or-raise.
* helm-external.el (helm-run-or-raise): Do it.
Diffstat (limited to 'helm-external.el')
-rw-r--r-- | helm-external.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/helm-external.el b/helm-external.el index d61c40d8..bcb1742f 100644 --- a/helm-external.el +++ b/helm-external.el @@ -84,24 +84,24 @@ and sets `helm-external-commands-list'." "Generic command that run asynchronously EXE. If EXE is already running just jump to his window if `helm-raise-command' is non--nil. -When FILE argument is provided run EXE with FILE. -In this case EXE must be provided as \"EXE %s\"." - (let* ((real-com (car (split-string (replace-regexp-in-string - "%s" "" exe)))) +When FILE argument is provided run EXE with FILE." + (let* ((real-com (car (split-string exe))) (proc (if file (concat real-com " " file) real-com)) process-connection-type) (if (get-process proc) (if helm-raise-command (shell-command (format helm-raise-command real-com)) (error "Error: %s is already running" real-com)) - (when (cl-loop for i in helm-external-commands-list thereis (string= real-com i)) + (when (member real-com helm-external-commands-list) (message "Starting %s..." real-com) (if file (start-process-shell-command - proc nil (format exe (shell-quote-argument - (if (eq system-type 'windows-nt) - (helm-w32-prepare-filename file) - file)))) + proc nil (format "%s %s" + real-com + (shell-quote-argument + (if (eq system-type 'windows-nt) + (helm-w32-prepare-filename file) + file)))) (start-process-shell-command proc nil real-com)) (set-process-sentinel (get-process proc) |