System.Console.Haskeline.Prefs
Description
Prefs allow the user to customize the line-editing interface. They are
read by default from ~/.haskeline; to override that behavior, use
readPrefs and runInputTWithPrefs.
Each line of a .haskeline file defines
one field of the Prefs datatype; field names are case-insensitive and
unparseable lines are ignored. For example:
editMode: Vi completionType: MenuCompletion maxhistorysize: Just 40
- data Prefs = Prefs {
- bellStyle :: !BellStyle
- editMode :: !EditMode
- maxHistorySize :: !(Maybe Int)
- completionType :: !CompletionType
- completionPaging :: !Bool
- completionPromptLimit :: !(Maybe Int)
- listCompletionsImmediately :: !Bool
- data CompletionType
- data BellStyle
- = NoBell
- | VisualBell
- | AudibleBell
- data EditMode
- defaultPrefs :: Prefs
- mkSettor :: Read a => (a -> Prefs -> Prefs) -> String -> Prefs -> Prefs
- settors :: [(String, String -> Prefs -> Prefs)]
- readPrefs :: FilePath -> IO Prefs
Documentation
Constructors
| Prefs | |
Fields
| |
Constructors
| NoBell | |
| VisualBell | |
| AudibleBell |
The default preferences which may be overwritten in the .haskeline file:
defaultPrefs = Prefs {bellStyle = AudibleBell,
maxHistorySize = Nothing,
editMode = Emacs,
completionType = ListCompletion,
completionPaging = True,
completionPromptLimit = Just 100,
listCompletionsImmediately = True
}