packages feed

shell-escape 0.0.0 → 0.1.1

raw patch · 5 files changed

+13/−5 lines, 5 files

Files

Text/ShellEscape.hs view
@@ -5,7 +5,9 @@ module Text.ShellEscape   ( Text.ShellEscape.Escape.Escape(..)   , Text.ShellEscape.Sh.Sh()+  , Text.ShellEscape.Sh.sh   , Text.ShellEscape.Bash.Bash()+  , Text.ShellEscape.Bash.bash   ) where  import Text.ShellEscape.Escape
Text/ShellEscape/Bash.hs view
@@ -21,6 +21,10 @@ newtype Bash                 =  Bash (EscapeVector EscapingMode)  deriving (Eq, Ord, Show) +{-| Construct a Bash escaped intermediate form.+ -}+bash                        ::  ByteString -> Bash+bash                         =  escape  instance Escape Bash where   escape                     =  Bash . escWith classify@@ -47,7 +51,6 @@     ANSIBackslash           ->  Put.putString $ backslashify c  backslashify                ::  Char -> String-backslashify '\ESC'          =  "\\e" backslashify c               =  (take 2 . drop 1 . show) c  hexify                      ::  Char -> String@@ -56,8 +59,6 @@ classify                    ::  Char -> EscapingMode classify c | c <= '\ACK'     =  ANSIHex            | c <= '\r'       =  ANSIBackslash-           | c <= '\SUB'     =  ANSIHex-           | c == '\ESC'     =  ANSIBackslash            | c <= '\US'      =  ANSIHex            | c <= '&'        =  Quoted            | c == '\''       =  ANSIBackslash
Text/ShellEscape/EscapeVector.hs view
@@ -6,7 +6,7 @@  import Data.Vector (Vector) import qualified Data.Vector as Vector-import qualified Data.Vector.Mutable as Vector+import qualified Data.Vector.Mutable as Vector (new, write)  import qualified Text.ShellEscape.Put as Put 
Text/ShellEscape/Sh.hs view
@@ -19,6 +19,11 @@ newtype Sh                   =  Sh (EscapeVector EscapingMode)  deriving (Eq, Ord, Show) +{-| Construct a Bourne Shell escaped intermediate form.+ -}+sh                          ::  ByteString -> Sh+sh                           =  escape+ instance Escape Sh where   escape                     =  Sh . escWith classify   unescape (Sh v)            =  stripEsc v
shell-escape.cabal view
@@ -1,5 +1,5 @@ name                          : shell-escape-version                       : 0.0.0+version                       : 0.1.1 category                      : Text license                       : BSD3 license-file                  : LICENSE