summaryrefslogtreecommitdiff
path: root/Options.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-29 23:48:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-30 00:28:22 -0400
commit4e9be0d1f86893a469b33b763b55edfe75bdb3aa (patch)
treee721a64007bc52df419a720caf2907dcf62e54ef /Options.hs
parentef5330120c0b522ff159a5b3caba7a926236947b (diff)
refactoring and cleanup
No code changes.
Diffstat (limited to 'Options.hs')
-rw-r--r--Options.hs39
1 files changed, 36 insertions, 3 deletions
diff --git a/Options.hs b/Options.hs
index 0c7b4d5f4..a8c165a81 100644
--- a/Options.hs
+++ b/Options.hs
@@ -1,6 +1,6 @@
-{- git-annex dashed options
+{- git-annex command-line options
-
- - Copyright 2010 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -12,7 +12,6 @@ import System.Log.Logger
import Common.Annex
import qualified Annex
-import Command
import Limit
{- Each dashed command-line option results in generation of an action
@@ -59,3 +58,37 @@ matcherOptions =
where
longopt o = Option [] [o] $ NoArg $ addToken o
shortopt o = Option o [] $ NoArg $ addToken o
+
+{- Descriptions of params used in usage messages. -}
+paramPaths :: String
+paramPaths = paramOptional $ paramRepeating paramPath -- most often used
+paramPath :: String
+paramPath = "PATH"
+paramKey :: String
+paramKey = "KEY"
+paramDesc :: String
+paramDesc = "DESC"
+paramUrl :: String
+paramUrl = "URL"
+paramNumber :: String
+paramNumber = "NUMBER"
+paramRemote :: String
+paramRemote = "REMOTE"
+paramGlob :: String
+paramGlob = "GLOB"
+paramName :: String
+paramName = "NAME"
+paramUUID :: String
+paramUUID = "UUID"
+paramType :: String
+paramType = "TYPE"
+paramKeyValue :: String
+paramKeyValue = "K=V"
+paramNothing :: String
+paramNothing = ""
+paramRepeating :: String -> String
+paramRepeating s = s ++ " ..."
+paramOptional :: String -> String
+paramOptional s = "[" ++ s ++ "]"
+paramPair :: String -> String -> String
+paramPair a b = a ++ " " ++ b