org.jboss.aesh.console.settings
public class Settings extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
doReadInputrc()
Should we read config from inputrc
Set to true by default
|
File |
getAliasFile() |
String |
getBellStyle()
By default, bell style is noisy
NOTE: Not implemented yet
|
Mode |
getEditMode()
Either Emacs or Vi mode.
|
EditMode |
getFullEditMode()
Get EditMode based on os and mode
|
File |
getHistoryFile()
If not set the history file will be:
$HOME/.aesh_history
|
int |
getHistorySize()
By default history size is 500
If its set to -1 the size is unlimited (Integer.MAX_VALUE)
|
File |
getInputrc()
Get the inputrc file, if not set it defaults to:
System.getProperty("user.home")+Config.getPathSeparator()+".inputrc"
|
InputStream |
getInputStream()
If not set, System.in will be used
|
static Settings |
getInstance() |
InterruptHook |
getInterruptHook() |
String |
getLogFile()
Get log file
|
String |
getName()
Get the name of the cli
|
KeyOperationManager |
getOperationManager() |
OutputStream |
getStdErr()
If not set System.out is used
|
OutputStream |
getStdOut()
If not set System.out is used
|
Terminal |
getTerminal()
Use the specified terminal implementation
If not set, aesh will try to use the best suited one
|
boolean |
hasInterruptHook() |
boolean |
isAliasEnabled() |
boolean |
isAnsiConsole() |
boolean |
isDisableCompletion()
Is completion disabled?
Set to false by default
|
boolean |
isHistoryDisabled()
Is history disabled
Set to true to disable history
|
boolean |
isHistoryPersistent()
Is the history list persisted to file.
|
boolean |
isLogging()
Are we logging?
|
boolean |
isPipelineAndRedirectionEnabled() |
boolean |
isReadAhead()
Read all bytes on buffer if its available
Set to true by default
WARNING: Do not set this to false if unsure
|
void |
quit() |
void |
resetEditMode() |
void |
resetToDefaults() |
void |
setAliasEnabled(boolean enabled) |
void |
setAliasFile(File file) |
void |
setAnsiConsole(boolean ansiConsole)
Possible to override the type of console
|
void |
setBellStyle(String bellStyle) |
void |
setDisableCompletion(boolean disableCompletion)
Set to true do disable completion
Set to false by default
|
void |
setEditMode(Mode editMode) |
void |
setEnablePipelineAndRedirectionParser(boolean enable) |
void |
setHistoryDisabled(boolean historyDisabled)
Is history disabled
Set to true to disable history
|
void |
setHistoryFile(File historyFile) |
void |
setHistoryPersistent(boolean historyPersistent)
Is the history list persisted to file.
|
void |
setHistorySize(int historySize)
By default history size is 500
If its set to -1 the size is unlimited (Integer.MAX_VALUE)
|
void |
setInputrc(File inputrc) |
void |
setInputStream(InputStream inputStream)
Set where input is coming from
|
void |
setInterruptHook(InterruptHook hook) |
void |
setLogFile(String logFile)
Specify a log file
|
void |
setLogging(boolean logging)
Set logging, by default set to true
|
void |
setName(String name)
Set the name of the cli
|
void |
setQuitHandler(QuitHandler qh) |
void |
setReadAhead(boolean readAhead)
Read all bytes on buffer if its available
Set to true by default
WARNING: Do not set this to false if unsure
|
void |
setReadInputrc(boolean readInputrc)
Specify if we should read config from inputrc
Set to true by default
|
void |
setStdErr(OutputStream stdErr)
Set where output should go to
|
void |
setStdOut(OutputStream stdOut)
Set where output should go to
|
void |
setTerminal(Terminal terminal)
Specify which terminal impl to use
|
public static Settings getInstance()
public void resetToDefaults()
public void setName(String name)
name
- namepublic String getName()
public Mode getEditMode()
public void setEditMode(Mode editMode)
public EditMode getFullEditMode()
public void resetEditMode()
public KeyOperationManager getOperationManager()
public File getHistoryFile()
public void setHistoryFile(File historyFile)
public int getHistorySize()
public void setHistorySize(int historySize)
historySize
- sizepublic String getBellStyle()
public void setBellStyle(String bellStyle)
public boolean isAnsiConsole()
public void setAnsiConsole(boolean ansiConsole)
ansiConsole
- is it an ansi compatible console?public InputStream getInputStream()
public void setInputStream(InputStream inputStream)
inputStream
- inputpublic OutputStream getStdOut()
public void setStdOut(OutputStream stdOut)
stdOut
- outputpublic OutputStream getStdErr()
public void setStdErr(OutputStream stdErr)
stdErr
- outputpublic Terminal getTerminal()
public void setTerminal(Terminal terminal)
terminal
- termpublic File getInputrc()
public void setInputrc(File inputrc)
public boolean isLogging()
public void setLogging(boolean logging)
logging
- do logpublic boolean isDisableCompletion()
public void setDisableCompletion(boolean disableCompletion)
disableCompletion
- dispublic String getLogFile()
public void setLogFile(String logFile)
logFile
- filepublic boolean doReadInputrc()
public void setReadInputrc(boolean readInputrc)
readInputrc
- specifypublic boolean isHistoryDisabled()
public void setHistoryDisabled(boolean historyDisabled)
historyDisabled
- historypublic boolean isHistoryPersistent()
public void setHistoryPersistent(boolean historyPersistent)
historyPersistent
- historypublic boolean isReadAhead()
public void setReadAhead(boolean readAhead)
readAhead
- readpublic void setAliasFile(File file)
public File getAliasFile()
public boolean isAliasEnabled()
public void setAliasEnabled(boolean enabled)
public void setQuitHandler(QuitHandler qh)
public void quit()
public void setInterruptHook(InterruptHook hook)
public boolean hasInterruptHook()
public InterruptHook getInterruptHook()
public void setEnablePipelineAndRedirectionParser(boolean enable)
public boolean isPipelineAndRedirectionEnabled()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.