@@ -54,7 +54,7 @@ tactics = map fst tacticArgs
5454-- | Convert a name into a string usable for completion. Filters out names
5555-- that users probably don't want to see.
5656nameString :: Name -> Maybe String
57−nameString (UN nm)
57+nameString (UN nm)
5858 | not (tnull nm) && (thead nm == '@' || thead nm == '#') = Nothing
5959nameString (UN n) = Just (str n)
6060nameString (NS n _) = nameString n
@@ -106,6 +106,10 @@ completeOption :: CompletionFunc Idris
106106completeOption = completeWord Nothing " \t" completeOpt
107107 where completeOpt = return . completeWith ["errorcontext", "showimplicits", "originalerrors"]
108108
109+completeConsoleWidth :: CompletionFunc Idris
110+completeConsoleWidth = completeWord Nothing " \t" completeW
111+ where completeW = return . completeWith ["auto", "infinite", "80", "120"]
112+
109113isWhitespace :: Char -> Bool
110114isWhitespace = (flip elem) " \t\n"
111115
@@ -152,6 +156,7 @@ completeCmd cmd (prev, next) = fromMaybe completeCmdName $ fmap completeArg $ lo
152156 completeArg MetaVarArg = completeMetaVar (prev, next) -- FIXME only complete one name
153157 completeArg ColourArg = completeColour (prev, next)
154158 completeArg NoArg = noCompletion (prev, next)
159+ completeArg ConsoleWidthArg = completeConsoleWidth (prev, next)
155160 completeCmdName = return $ ("", completeWith commands cmd)
156161
157162-- | Complete REPL commands and defined identifiers