From 56c0bf6c690ffddc4ac561393f4cd21d087b7ddb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Jul 2015 00:55:53 -0400 Subject: convert global options (still not used) --- CmdLine/GitAnnexShell.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CmdLine/GitAnnexShell.hs') 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 -- cgit v1.2.3