summaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnexShell.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 00:55:53 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 01:39:06 -0400
commit56c0bf6c690ffddc4ac561393f4cd21d087b7ddb (patch)
tree745ab36efe39f693d776a16a73758e04409f74a1 /CmdLine/GitAnnexShell.hs
parentea0f914261e4747de75339952c2d47374c5a7803 (diff)
convert global options (still not used)
Diffstat (limited to 'CmdLine/GitAnnexShell.hs')
-rw-r--r--CmdLine/GitAnnexShell.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/CmdLine/GitAnnexShell.hs b/CmdLine/GitAnnexShell.hs
index 386780add..5bc297a71 100644
--- a/CmdLine/GitAnnexShell.hs
+++ b/CmdLine/GitAnnexShell.hs
@@ -8,7 +8,6 @@
module CmdLine.GitAnnexShell where
import System.Environment
-import System.Console.GetOpt
import Common.Annex
import qualified Git.Construct
@@ -54,9 +53,13 @@ cmds = map adddirparam $ cmds_readonly ++ cmds_notreadonly
where
adddirparam c = c { cmdparamdesc = "DIRECTORY " ++ cmdparamdesc c }
-options :: [OptDescr (Annex ())]
-options = commonOptions ++
- [ Option [] ["uuid"] (ReqArg checkUUID paramUUID) "local repository uuid"
+options :: Parser GlobalSetter
+options = globalSetters
+ [ commonGlobalOptions
+ , globalSetter checkUUID $ strOption
+ ( long "uuid" <> metavar paramUUID
+ <> help "local repository uuid"
+ )
]
where
checkUUID expected = getUUID >>= check