Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Shellish -> Shelly

  • Loading branch information...
commit 38c48f4383dc9e54fcbbd2c2a4a7554b12ad7aee 1 parent 84d8202
@gregwebs gregwebs authored
View
8 Shellish.hs → Shelly.hs
@@ -6,10 +6,10 @@
-- this module is (unlike standard Haskell filesystem functionality)
-- thread-safe: each ShIO maintains its own environment and its own working
-- directory.
-module Shellish
+module Shelly
(
-- * Entering ShIO.
- ShIO, shellish, sub, silently, verbosely
+ ShIO, shelly, sub, silently, verbosely
-- * Modifying and querying environment.
, setenv, getenv, cd, chdir, pwd
@@ -284,8 +284,8 @@ sub a = do
-- inherited from the current process-wide values. Any subsequent changes in
-- processwide working directory or environment are not reflected in the
-- running ShIO.
-shellish :: MonadIO m => ShIO a -> m a
-shellish a = do
+shelly :: MonadIO m => ShIO a -> m a
+shelly a = do
env <- liftIO $ getEnvironment
dir <- liftIO $ getCurrentDirectory
let def = St { sCode = 0
View
47 shellish.cabal
@@ -1,47 +0,0 @@
-Name: shellish
-
--- The package version. See the Haskell package versioning policy
--- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
--- standards guiding when and how versions should be incremented.
-Version: 0.2.0
-
-Synopsis: shell-/perl- like (systems) programming in Haskell
-
-Description: The shellisg package provides a single module for convenient
- \"systems\" programming in Haskell, similar in spirit to POSIX
- shells or PERL.
- .
- * Elegance and safety is sacrificed for conciseness and
- swiss-army-knife-ness.
- .
- * The interface exported by Shellish is thread-safe.
- .
- Overall, the module should help you to get a job done quickly,
- without getting too dirty.
-
-Homepage: http://repos.mornfall.net/shellish
-License: BSD3
-License-file: LICENSE
-Author: Petr Rockai <me@mornfall.net>
-Maintainer: me@mornfall.net
-Category: Development
-Build-type: Simple
-Cabal-version: >=1.6
-
--- Extra-source-files:
-
-Library
- -- Modules exported by the library.
- Exposed-modules: Shellish
-
- Build-depends: mtl, process, filepath, bytestring, text, base >= 4 && < 5, time, directory,
- unix-compat
-
- ghc-options: -Werror -Wall
-
-Executable drain
- main-is: test/drain.hs
-
-source-repository head
- type: darcs
- location: http://repos.mornfall.net/shellish
View
47 shelly.cabal
@@ -0,0 +1,47 @@
+Name: shelly
+
+Version: 0.3.0
+Synopsis: shell-like (systems) programming in Haskell
+
+Description: Shelly is a package provides a single module for convenient
+ systems programming in Haskell, similar in spirit to POSIX
+ shells.
+ .
+ * Shelly is aimed at getting things done rather than
+ being a demonstration of elegance.
+ .
+ * Shelly maintains its own environment, making it thread-safe.
+ .
+ These are in contrast to HSH. Elegance in HSH comes from polymorphic input and output.
+ If you frequently want a different data type than Text from running a system command, you may want to use HSH.
+ .
+ Shelly is a fork of Shellish that features low memory usage and fixes a handle draining bug.
+
+Homepage: http://github.com/gregwebs/shelly
+License: BSD3
+License-file: LICENSE
+Author: Petr Rockai, Greg Weber
+Maintainer: Greg Weber <greg@gregweber.info>
+Category: Development
+Build-type: Simple
+Cabal-version: >=1.6
+
+-- Extra-source-files:
+
+Library
+ -- Modules exported by the library.
+ Exposed-modules: Shelly
+
+ Build-depends: mtl, process, filepath, bytestring, text, base >= 4 && < 5, time, directory,
+ unix-compat
+
+ ghc-options: -Werror -Wall
+
+-- demonstarated that command output in Shellish was not shown until after the command finished
+-- not necessary anymore
+-- Executable drain
+-- main-is: test/drain.hs
+
+source-repository head
+ type: darcs
+ location: http://repos.mornfall.net/shelly
View
4 test/drain.hs
@@ -1,9 +1,9 @@
{-# Language OverloadedStrings #-}
-import Shellish
+import Shelly
main :: IO ()
main =
- shellish $ do
+ shelly $ do
res <- run "test/drain.sh" []
echo "haskell done"
echo res
Please sign in to comment.
Something went wrong with that request. Please try again.