diff options
author | 2015-07-09 11:49:52 -0400 | |
---|---|---|
committer | 2015-07-09 11:52:47 -0400 | |
commit | 6ddffe0f0e64a87fd924f736941fa242e0d740a6 (patch) | |
tree | 94bc5fed6512ea3cfab47b274cf5534edf889b77 /CmdLine/GitAnnex.hs | |
parent | 1e4c1adeae64baa4eb30fd7e1171620c27e0e17f (diff) |
let optparse-applicative handle the usage display when run w/o command or bad command
Still generating the list of commands myself, to get it sorted into
sections and with short synopses.
Diffstat (limited to 'CmdLine/GitAnnex.hs')
-rw-r--r-- | CmdLine/GitAnnex.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CmdLine/GitAnnex.hs b/CmdLine/GitAnnex.hs index 80ee876ff..5e37a885a 100644 --- a/CmdLine/GitAnnex.hs +++ b/CmdLine/GitAnnex.hs @@ -19,6 +19,7 @@ import qualified Command.Add import qualified Command.Unannex import qualified Command.Fsck {- +import qualified Command.Help import qualified Command.Drop import qualified Command.Move import qualified Command.Copy @@ -97,7 +98,6 @@ import qualified Command.Proxy import qualified Command.DiffDriver import qualified Command.Undo import qualified Command.Version -import qualified Command.Help #ifdef WITH_ASSISTANT import qualified Command.Watch import qualified Command.Assistant @@ -124,6 +124,7 @@ cmds = [ Command.Add.cmd , Command.Fsck.cmd {- + , Command.Help.cmd , Command.Get.cmd , Command.Drop.cmd , Command.Move.cmd @@ -204,7 +205,6 @@ cmds = , Command.DiffDriver.cmd , Command.Undo.cmd , Command.Version.cmd - , Command.Help.cmd #ifdef WITH_ASSISTANT , Command.Watch.cmd , Command.Assistant.cmd @@ -224,9 +224,6 @@ cmds = -} ] -header :: String -header = "git-annex command [option ...]" - run :: [String] -> IO () run args = do #ifdef WITH_EKG @@ -234,7 +231,9 @@ run args = do #endif go envmodes where - go [] = dispatch True args cmds gitAnnexOptions [] header Git.CurrentRepo.get + go [] = dispatch True args cmds gitAnnexOptions [] Git.CurrentRepo.get + "git-annex" + "manage files with git, without checking their contents in" go ((v, a):rest) = maybe (go rest) a =<< getEnv v envmodes = [ (sshOptionsEnv, runSshOptions args) |