From: Judah Jacobson Date: Thu, 16 Oct 2008 01:57:21 +0000 (+0000) Subject: Eliminate duplicate flags in the tab completion of ghci's :set command. X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ec70c0a7512cd18ad08d23d69a8eea645fc8f2cf Eliminate duplicate flags in the tab completion of ghci's :set command. --- diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 3b5fde9..a2108bb 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -1739,7 +1739,8 @@ completeHomeModule w = do completeSetOptions w = do return (filter (w `isPrefixOf`) options) - where options = "args":"prog":allFlags + where options = "args":"prog":flagList + flagList = map head $ group $ sort allFlags completeFilename w = do ws <- Readline.filenameCompletionFunction w