git.iko.soy/typeable/pandoc
on master help sign in
Have `--help` print in and out formats in alphabetical order.
commit333deac26b616850141d61a53bdf30fc3fdb3771 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 8 Apr 2013, 09:44 (14 years ago) parent1298996
1 file changed+3−3
pandoc.hs+3−3
pandoc.hs+3−3
@@ -44,7 +44,7 @@ import System.Exit ( exitWith, ExitCode (..) )
4444import System.FilePath
4545import System.Console.GetOpt
4646import Data.Char ( toLower )
47−import Data.List ( intercalate, isPrefixOf )
47+import Data.List ( intercalate, isPrefixOf, sort )
4848import System.Directory ( getAppUserDataDirectory, doesFileExist, findExecutable )
4949import System.IO ( stdout )
5050import System.IO.Error ( isDoesNotExistError )
@@ -741,8 +741,8 @@ usageMessage programName = usageInfo
741741 (wrapWords 16 78 $ readers'names) ++ "\nOutput formats: " ++
742742 (wrapWords 16 78 $ writers'names) ++ "\nOptions:")
743743 where
744− writers'names = map fst writers
745− readers'names = map fst readers
744+ writers'names = sort $ map fst writers
745+ readers'names = sort $ map fst readers
746746
747747-- Determine default reader based on source file extensions
748748defaultReaderName :: String -> [FilePath] -> String