Fix shell-command composition bug
This commit is contained in:
parent
8bcf6530e5
commit
b11f18d77f
11
imeks.el
11
imeks.el
|
@ -94,7 +94,7 @@ if an X keyboard."
|
||||||
(nconc delete-frame-functions '(imeks--handle-delete-frame))
|
(nconc delete-frame-functions '(imeks--handle-delete-frame))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
;;; Util
|
;;; Util
|
||||||
;;; ―――――――――――――――――――――――――――――――――――――
|
;;; ―――――――――――――――――――――――――――――――――――――
|
||||||
(defun xdotool-type-string (string &optional delay)
|
(defun xdotool-type-string (string &optional delay)
|
||||||
|
@ -108,13 +108,14 @@ Optionally waits a DELAY in seconds before typing the string."
|
||||||
imeks-xdotool-path line))
|
imeks-xdotool-path line))
|
||||||
(string-lines string)))
|
(string-lines string)))
|
||||||
(type-cmd ; Work-around, since not all programs accept a typed newline.
|
(type-cmd ; Work-around, since not all programs accept a typed newline.
|
||||||
(reduce (lambda (a b)
|
(seq-reduce (lambda (a b)
|
||||||
(format "%s; %s key return; %s" a imeks-xdotool-path b))
|
(if a
|
||||||
type-cmds))
|
(format "%s; %s key return; %s" a imeks-xdotool-path b)
|
||||||
|
b))
|
||||||
|
type-cmds nil))
|
||||||
(cmd-string
|
(cmd-string
|
||||||
(concat sleep-cmd type-cmd)))
|
(concat sleep-cmd type-cmd)))
|
||||||
(call-process "bash" nil 0 nil
|
(call-process "bash" nil 0 nil
|
||||||
"-c" cmd-string)))
|
"-c" cmd-string)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'imeks)
|
(provide 'imeks)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue