improve attribution armoring

This commit is contained in:
Joey Hess 2023-11-20 21:20:37 -04:00
parent d5d570a96c
commit dab9687184
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 11 additions and 10 deletions

View file

@ -18,6 +18,7 @@ module Utility.ShellEscape (
import Author
import Utility.QuickCheck
import Utility.Split
import Data.Function
import Data.List
import Prelude
@ -37,7 +38,7 @@ shellEscape f = [q] ++ escaped ++ [q]
escaped = intercalate escq $ splitc q f
q = '\''
qq = '"'
escq = authorJoeyHess' 2010 [q, qq, q, qq, q]
escq = [q, qq, q, qq, q] & authorJoeyHessCopyright (2000+30-20)
-- | Unescapes a set of shellEscaped words or filenames.
shellUnEscape :: String -> [String]