initBackend :: (IO bst) | Provides the backend a way to perform any necessary initilization
before the shell starts. This function is called once for each
shell instance. The generated value will be passed back in to each call of the
other methods in this record.
|
shutdownBackend :: (bst -> IO ()) | Called when the shell exits to allow the backend to perform any necessary
cleanup actions.
|
outputString :: (bst -> BackendOutput -> IO ()) | Causes the string to be sent to the underlying console device.
|
flushOutput :: (bst -> IO ()) | Perform any operations necessary to clear any output buffers. After this
operation, the user should be able to view any output sent to this backend.
|
getSingleChar :: (bst -> String -> IO (Maybe Char)) | Retrive a single character from the user without waiting for carriage return.
|
getInput :: (bst -> String -> IO (Maybe String)) | Print the prompt and retrive a line of input from the user.
|
addHistory :: (bst -> String -> IO ()) | Add a string to the history list.
|
setWordBreakChars :: (bst -> String -> IO ()) | Set the characters which define word boundaries. This is mostly used
for defining where completions occur.
|
getWordBreakChars :: (bst -> IO String) | Get the current set of word break characters.
|
onCancel :: (bst -> IO ()) | A callback to run whenever evaluation or a command is cancled
by the keyboard signal
|
setAttemptedCompletionFunction :: (bst -> CompletionFunction -> IO ()) | A completion function that is tried first.
|
setDefaultCompletionFunction :: (bst -> Maybe (String -> IO [String]) -> IO ()) | An alternate function to generate completions. The function given takes the
word as an argument and generates all possible completions. This function is called
(if set) after the attemptedCompletionFunction if it returns 'Nothing'.
|
completeFilename :: (bst -> String -> IO [String]) | A backend-provided method to complete filenames.
|
completeUsername :: (bst -> String -> IO [String]) | A backend-provided method to complete usernames.
|
clearHistoryState :: (bst -> IO ()) | An operation to clear the history buffer.
|
setMaxHistoryEntries :: (bst -> Int -> IO ()) | Sets the maximum number of entries managed by the history buffer.
|
getMaxHistoryEntries :: (bst -> IO Int) | Gets the maximum number of entries managed by the history buffer.
|
readHistory :: (bst -> FilePath -> IO ()) | Read the history buffer from a file. The file should be formatted
as plain-text, with each line in the file representing a single command
entered, most recent commands at the bottom. (This format is what readline
produces)
|
writeHistory :: (bst -> FilePath -> IO ()) | Write the history buffer to a file. The file should be formatted in the
same way as in the description for readHistory.
|