From 49ae109e7d595dc4e2c9841b2e0d47f5961e7518 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Thu, 10 Feb 2022 23:06:34 +0300 Subject: [PATCH] fix: shell escape --- ivy-pass.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ivy-pass.el b/ivy-pass.el index d6cab8b..06f63ec 100644 --- a/ivy-pass.el +++ b/ivy-pass.el @@ -105,11 +105,12 @@ Call CALLBACK when the last command is executed." (defun ivy-pass--get-type-command (str) "Return a command to type STR." (concat - "printf \"" + "printf " (shell-quote-argument str) - "\" | xdotool type --clearmodifiers --file - --delay " + "| xdotool type --clearmodifiers --file - --delay " (number-to-string ivy-pass-delay))) + (defun ivy-pass--get-wait-command (&optional miliseconds) "Return a command to sleep for `ivy-pass-initial-wait'." (format "sleep %f" (/ (float (or miliseconds ivy-pass-initial-wait)) 1000))) @@ -159,7 +160,7 @@ SEQUENCE is a list of the following elements: (ivy-exit-with-action (lambda (entry-name) (ivy-pass--async-commands - (ivy-pass--get-commands entry-name sequence))))) + (ivy-pass--get-commands entry-name ,sequence))))) (defun ,(intern (format "ivy-pass--type-%s-action" sequence-name)) (entry-name) (ivy-pass--async-commands (ivy-pass--get-commands