summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-04-08 09:44:23 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-04-08 09:44:23 -0700
commit333deac26b616850141d61a53bdf30fc3fdb3771 (patch)
treeebdaa99d628987285577c38843463d2d2daa796e /pandoc.hs
parent129899647eb05e8b8f7fecdf09027088e405bc1a (diff)
Have `--help` print in and out formats in alphabetical order.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 9f847c5bc..7608ad017 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -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