X.U.Run: Add findFile

This commit is contained in:
Tony Zorman
2022-09-19 09:40:06 +02:00
parent 2ebbe57bc2
commit a44df170f4
2 changed files with 10 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
- It is now ensured that all arguments of `execute` and `eval` are
quoted.
- Added `findFile` as a shorthand to call `find-file`.
### Other changes
## 0.17.1 (September 3, 2022)

View File

@@ -75,6 +75,7 @@ module XMonad.Util.Run (
require,
progn,
quote,
findFile,
-- * Re-exports
hPutStr,
@@ -454,6 +455,13 @@ require = inParens . ("require " <>) . quote
quote :: String -> String
quote = inParens . ("quote " <>)
-- | Call @find-file@.
--
-- >>> findFile "/path/to/file"
-- "(find-file \"/path/to/file\" )"
findFile :: String -> String
findFile = inParens . ("find-file" <>) . asString
-----------------------------------------------------------------------
-- Batch mode