diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-04-08 09:44:23 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-04-08 09:44:23 -0700 |
commit | 333deac26b616850141d61a53bdf30fc3fdb3771 (patch) | |
tree | ebdaa99d628987285577c38843463d2d2daa796e | |
parent | 129899647eb05e8b8f7fecdf09027088e405bc1a (diff) | |
download | pandoc-333deac26b616850141d61a53bdf30fc3fdb3771.tar.gz |
Have `--help` print in and out formats in alphabetical order.
-rw-r--r-- | pandoc.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -44,7 +44,7 @@ import System.Exit ( exitWith, ExitCode (..) ) import System.FilePath import System.Console.GetOpt import Data.Char ( toLower ) -import Data.List ( intercalate, isPrefixOf ) +import Data.List ( intercalate, isPrefixOf, sort ) import System.Directory ( getAppUserDataDirectory, doesFileExist, findExecutable ) import System.IO ( stdout ) import System.IO.Error ( isDoesNotExistError ) @@ -741,8 +741,8 @@ usageMessage programName = usageInfo (wrapWords 16 78 $ readers'names) ++ "\nOutput formats: " ++ (wrapWords 16 78 $ writers'names) ++ "\nOptions:") where - writers'names = map fst writers - readers'names = map fst readers + writers'names = sort $ map fst writers + readers'names = sort $ map fst readers -- Determine default reader based on source file extensions defaultReaderName :: String -> [FilePath] -> String |