aboutsummaryrefslogtreecommitdiff
path: root/Commands.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-14 23:57:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-14 23:57:22 -0400
commite7ffa5b594deb9d89d555b24f8ed7842951905af (patch)
treeb1ce90245c81432d5e60d90415a21d7ebbc04172 /Commands.hs
parentbbbe9858fe2e83767661282f7ab8ed3470ec6568 (diff)
update
Diffstat (limited to 'Commands.hs')
-rw-r--r--Commands.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Commands.hs b/Commands.hs
index 5b5bc269b..5021ba260 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -21,8 +21,8 @@ import Types
import Core
import qualified Remotes
-{- Parses command line and returns a list of actons to be run in the Annex
- - monad. -}
+{- Parses command line and returns a list of flags and a list of
+ - actions to be run in the Annex monad. -}
parseCmd :: [String] -> IO ([Flag], [Annex ()])
parseCmd argv = do
(flags, nonopts) <- getopt
@@ -40,15 +40,16 @@ parseCmd argv = do
(_, _, errs) -> ioError (userError (concat errs ++ usageInfo header options))
lookupCmd cmd = filter (\(c, a) -> c == cmd) cmds
cmds = [ ("add", addCmd)
+ , ("get", getCmd)
+ , ("drop", dropCmd)
+ , ("want", wantCmd)
, ("push", pushCmd)
, ("pull", pullCmd)
- , ("want", wantCmd)
- , ("drop", dropCmd)
, ("unannex", unannexCmd)
]
header = "Usage: git-annex [" ++
(join "|" $ map fst cmds) ++ "] file ..."
- options = [ Option ['f'] ["force"] (NoArg Force) "" ]
+ options = [ Option ['f'] ["force"] (NoArg Force) "allow actions that may loose annexed data" ]
{- Default mode is to annex a file if it is not already, and otherwise
- get its content. -}