remove git-annex help options display
Common options will be displayed in the --help for a command by optparse-applicative.
This commit is contained in:
parent
92d8f80bff
commit
7d9072d1db
1 changed files with 0 additions and 7 deletions
|
@ -19,8 +19,6 @@ import qualified Command.Sync
|
||||||
import qualified Command.Whereis
|
import qualified Command.Whereis
|
||||||
import qualified Command.Fsck
|
import qualified Command.Fsck
|
||||||
|
|
||||||
import System.Console.GetOpt
|
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = noCommit $ dontCheck repoExists $
|
cmd = noCommit $ dontCheck repoExists $
|
||||||
noRepo (parseparams startNoRepo) $
|
noRepo (parseparams startNoRepo) $
|
||||||
|
@ -41,13 +39,9 @@ startNoRepo :: CmdParams -> IO ()
|
||||||
startNoRepo = start'
|
startNoRepo = start'
|
||||||
|
|
||||||
start' :: [String] -> IO ()
|
start' :: [String] -> IO ()
|
||||||
start' ["options"] = showCommonOptions
|
|
||||||
start' [c] = showGitHelp c
|
start' [c] = showGitHelp c
|
||||||
start' _ = showGeneralHelp
|
start' _ = showGeneralHelp
|
||||||
|
|
||||||
showCommonOptions :: IO ()
|
|
||||||
showCommonOptions = putStrLn $ usageInfo "Common options:" gitAnnexOptions
|
|
||||||
|
|
||||||
showGeneralHelp :: IO ()
|
showGeneralHelp :: IO ()
|
||||||
showGeneralHelp = putStrLn $ unlines
|
showGeneralHelp = putStrLn $ unlines
|
||||||
[ "The most frequently used git-annex commands are:"
|
[ "The most frequently used git-annex commands are:"
|
||||||
|
@ -64,7 +58,6 @@ showGeneralHelp = putStrLn $ unlines
|
||||||
]
|
]
|
||||||
, "Run 'git-annex' for a complete command list."
|
, "Run 'git-annex' for a complete command list."
|
||||||
, "Run 'git-annex help command' for help on a specific command."
|
, "Run 'git-annex help command' for help on a specific command."
|
||||||
, "Run `git annex help options' for a list of common options."
|
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
cmdline c = "\t" ++ cmdname c ++ "\t" ++ cmddesc c
|
cmdline c = "\t" ++ cmdname c ++ "\t" ++ cmddesc c
|
||||||
|
|
Loading…
Reference in a new issue