summaryrefslogtreecommitdiff
path: root/Command/Init.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-16 12:25:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-16 12:25:54 -0400
commitceff04ff3e7fff4b0ea6e8ad4334cca80d291880 (patch)
treee0e7296c82dc30b8e6dab1024a645d29a5c69b36 /Command/Init.hs
parent8fa17eaba08b99250d6290915379f048844d83d7 (diff)
better multiword parameter handling
This way, individual words as entered on the command line are available to commands.
Diffstat (limited to 'Command/Init.hs')
-rw-r--r--Command/Init.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Command/Init.hs b/Command/Init.hs
index 668b5c87d..b7a078799 100644
--- a/Command/Init.hs
+++ b/Command/Init.hs
@@ -27,15 +27,17 @@ command = [repoCommand "init" paramDesc seek
"initialize git-annex with repository description"]
seek :: [CommandSeek]
-seek = [withString start]
+seek = [withWords start]
{- Stores description for the repository etc. -}
-start :: CommandStartString
-start description = do
+start :: CommandStartWords
+start ws = do
when (null description) $
error "please specify a description of this repository\n"
showStart "init" description
next $ perform description
+ where
+ description = unwords ws
perform :: String -> CommandPerform
perform description = do