Support prelude/start-process

If you refer to the previous commit where I change shell-command usages to
start-process function calls, you'll see the rationale for why I prefer
start-process.

This commit introduces a more ergonomic API for start-process that fits most of
my current use-cases of it. This cleans up the code. I have introduced a bug in
the way that I'm tokenizing the COMMAND value. I've tracked that with a
TODO. For now it only affects the `xmodmap -e '<command-string>'` calls, which
isn't too disruptive.
This commit is contained in:
William Carroll 2019-12-23 17:31:42 +00:00
parent c078f04526
commit 5785a5d126
8 changed files with 93 additions and 62 deletions

View file

@ -22,11 +22,14 @@
(defconst string/test? t
"When t, run the tests.")
;; Strings
(defun string/hookify (x)
"Append \"-hook\" to X."
(s-append "-hook" x))
(defun string/split (y x)
"Map string X into a list of strings that were separated by Y."
(s-split y x))
(defun string/ensure-hookified (x)
"Ensure that X has \"-hook\" appended to it."
(if (s-ends-with? "-hook" x)