| Modifier and Type | Field and Description |
|---|---|
private AeshContext |
aeshContext |
private boolean |
aliasEnabled |
private java.io.File |
aliasFile |
private boolean |
ansiConsole |
private java.lang.String |
bellStyle |
private boolean |
disableCompletion |
private Mode |
editMode |
private boolean |
enableOperatorParser |
private java.lang.String |
execute |
private Resource |
executeFileAtStart |
private boolean |
exportEnabled |
private java.io.File |
exportFile |
private boolean |
exportUsesSystemEnvironment |
private boolean |
historyDisabled |
private java.io.File |
historyFile |
private FileAccessPermission |
historyFilePermission |
private boolean |
historyPersistent |
private int |
historySize |
private java.io.File |
inputrc |
private java.io.InputStream |
inputStream |
private InterruptHook |
interruptHook |
private boolean |
isLogging |
private java.lang.String |
logFile |
private boolean |
manEnabled |
private java.lang.String |
name |
private KeyOperationManager |
operationManager |
private boolean |
persistAlias |
private boolean |
persistExport |
private QuitHandler |
quitHandler |
private boolean |
readInputrc |
private Resource |
resource |
private java.io.PrintStream |
stdErr |
private java.io.PrintStream |
stdOut |
private Terminal |
terminal |
| Modifier | Constructor and Description |
|---|---|
protected |
SettingsImpl() |
protected |
SettingsImpl(Settings baseSettings) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
doExportUsesSystemEnvironment()
Is load environment system?
|
boolean |
doPersistAlias()
Is alias persisted
|
boolean |
doPersistExport()
Is aesh persisting variables at shutdown
|
boolean |
doReadInputrc()
Should we read config from inputrc
Set to true by default
|
void |
enableOperatorParser(boolean enable) |
AeshContext |
getAeshContext()
Get aesh context
|
java.io.File |
getAliasFile()
Location of alias file
|
java.lang.String |
getBellStyle()
By default, bell style is noisy
NOTE: Not implemented yet
|
EditMode |
getEditMode()
Get EditMode based on os and mode
|
java.lang.String |
getExecuteAtStart() |
Resource |
getExecuteFileAtStart() |
java.io.File |
getExportFile()
Get the export file
Defaults to ~/.aesh_export
|
java.io.File |
getHistoryFile()
If not set the history file will be:
$HOME/.aesh_history
|
FileAccessPermission |
getHistoryFilePermission()
Get history file access permission, this is used when write to history file.
|
int |
getHistorySize()
By default history size is 500
If its set to -1 the size is unlimited (Integer.MAX_VALUE)
|
java.io.File |
getInputrc()
Get the inputrc file, if not set it defaults to:
System.getProperty("user.home")+Config.getPathSeparator()+".inputrc"
|
java.io.InputStream |
getInputStream()
If not set, System.in will be used
|
InterruptHook |
getInterruptHook()
Get interrupt hook
|
java.lang.String |
getLogFile()
Get log file
|
Mode |
getMode()
Either Emacs or Vi mode.
|
java.lang.String |
getName()
Get the name of the cli
|
KeyOperationManager |
getOperationManager()
Get KeyOperationManager
|
QuitHandler |
getQuitHandler()
Get quit handler
|
Resource |
getResource() |
java.io.PrintStream |
getStdErr()
If not set System.out is used
|
java.io.PrintStream |
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()
Is an interrupt hook defined
|
boolean |
isAliasEnabled()
Is alias enabled
|
boolean |
isAnsiConsole()
If the current console is an ANSI console
|
boolean |
isCompletionDisabled()
Is completion disabled?
Set to false by default
|
boolean |
isExportEnabled()
Are export enabled?
|
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 |
isManEnabled()
Is the man command enabled (currently only for AeshConsole)
|
boolean |
isOperatorParserEnabled()
Is operator parser enabled
|
void |
resetEditMode()
Reset edit mode
|
void |
resetToDefaults() |
void |
setAeshContext(AeshContext aeshContext) |
void |
setAliasEnabled(boolean enabled) |
void |
setAliasFile(java.io.File file) |
void |
setAnsiConsole(boolean ansiConsole)
Possible to override the type of console
|
void |
setBellStyle(java.lang.String bellStyle) |
void |
setDisableCompletion(boolean disableCompletion)
Set to true do disable completion
Set to false by default
|
void |
setExecuteAtStart(java.lang.String execute) |
void |
setExecuteFileAtStart(Resource executeFileAtStart) |
void |
setExportEnabled(boolean exportEnabled) |
void |
setExportFile(java.io.File exportFile) |
void |
setExportUsesSystemEnvironment(boolean isLoad)
Aesh load environment system.
|
void |
setHistoryDisabled(boolean historyDisabled)
Is history disabled
Set to true to disable history
|
void |
setHistoryFile(java.io.File historyFile) |
void |
setHistoryFilePermission(FileAccessPermission historyFilePermission) |
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(java.io.File inputrc) |
void |
setInputStream(java.io.InputStream inputStream)
Set where input is coming from
|
void |
setInterruptHook(InterruptHook hook) |
void |
setLogFile(java.lang.String logFile)
Specify a log file
|
void |
setLogging(boolean logging)
Set logging, by default set to true
|
void |
setManEnabled(boolean enabled) |
void |
setMode(Mode editMode) |
void |
setName(java.lang.String name)
Set the name of the cli
|
void |
setPersistAlias(boolean persist) |
void |
setPersistExport(boolean persistExport)
Should aesh persist export variables at shutdown
|
void |
setQuitHandler(QuitHandler qh) |
void |
setReadInputrc(boolean readInputrc)
Specify if we should read config from inputrc
Set to true by default
|
void |
setResource(Resource resource)
Specify
|
void |
setStdErr(java.io.PrintStream stdErr)
Set where output should go to
|
void |
setStdOut(java.io.PrintStream stdOut)
Set where output should go to
|
void |
setTerminal(Terminal terminal)
Specify which terminal impl to use
|
void |
switchMode()
Switch from Emacs to Vi mode (or back)
|
private java.lang.String name
private Mode editMode
private java.io.File historyFile
private FileAccessPermission historyFilePermission
private int historySize
private boolean historyDisabled
private boolean historyPersistent
private java.lang.String bellStyle
private boolean ansiConsole
private java.io.InputStream inputStream
private java.io.PrintStream stdOut
private java.io.PrintStream stdErr
private Terminal terminal
private boolean readInputrc
private java.io.File inputrc
private boolean isLogging
private java.lang.String logFile
private boolean disableCompletion
private QuitHandler quitHandler
private KeyOperationManager operationManager
private java.io.File aliasFile
private boolean aliasEnabled
private boolean persistAlias
private InterruptHook interruptHook
private boolean enableOperatorParser
private boolean manEnabled
private AeshContext aeshContext
private boolean exportEnabled
private java.io.File exportFile
private boolean persistExport
private boolean exportUsesSystemEnvironment
private Resource resource
private java.lang.String execute
private Resource executeFileAtStart
protected SettingsImpl()
protected SettingsImpl(Settings baseSettings)
public void resetToDefaults()
public void setName(java.lang.String name)
name - namepublic java.lang.String getName()
public Mode getMode()
public void setMode(Mode editMode)
public EditMode getEditMode()
getEditMode in interface Settingspublic void resetEditMode()
SettingsresetEditMode in interface Settingspublic KeyOperationManager getOperationManager()
SettingsgetOperationManager in interface Settingspublic FileAccessPermission getHistoryFilePermission()
Settingsnull means default file permission revealed by system.getHistoryFilePermission in interface Settingspublic void setHistoryFilePermission(FileAccessPermission historyFilePermission)
historyFilePermission - the historyFilePermission to setpublic java.io.File getHistoryFile()
getHistoryFile in interface Settingspublic void setHistoryFile(java.io.File historyFile)
public int getHistorySize()
getHistorySize in interface Settingspublic void setHistorySize(int historySize)
historySize - sizepublic java.lang.String getBellStyle()
getBellStyle in interface Settingspublic void setBellStyle(java.lang.String bellStyle)
public boolean isAnsiConsole()
SettingsisAnsiConsole in interface Settingspublic void setAnsiConsole(boolean ansiConsole)
ansiConsole - is it an ansi compatible console?public java.io.InputStream getInputStream()
getInputStream in interface Settingspublic void setInputStream(java.io.InputStream inputStream)
inputStream - inputpublic java.io.PrintStream getStdOut()
public void setStdOut(java.io.PrintStream stdOut)
stdOut - outputpublic java.io.PrintStream getStdErr()
public void setStdErr(java.io.PrintStream stdErr)
stdErr - outputpublic Terminal getTerminal()
getTerminal in interface Settingspublic void setTerminal(Terminal terminal)
terminal - termpublic java.io.File getInputrc()
getInputrc in interface Settingspublic void setInputrc(java.io.File inputrc)
public boolean isLogging()
public void setLogging(boolean logging)
logging - do logpublic boolean isCompletionDisabled()
isCompletionDisabled in interface Settingspublic void setDisableCompletion(boolean disableCompletion)
disableCompletion - dispublic java.lang.String getLogFile()
getLogFile in interface Settingspublic void setLogFile(java.lang.String logFile)
logFile - filepublic boolean doReadInputrc()
doReadInputrc in interface Settingspublic void setReadInputrc(boolean readInputrc)
readInputrc - specifypublic boolean isHistoryDisabled()
isHistoryDisabled in interface Settingspublic void setHistoryDisabled(boolean historyDisabled)
historyDisabled - historypublic boolean isHistoryPersistent()
isHistoryPersistent in interface Settingspublic void setHistoryPersistent(boolean historyPersistent)
historyPersistent - historypublic void setAliasFile(java.io.File file)
public java.io.File getAliasFile()
SettingsgetAliasFile in interface Settingspublic boolean isAliasEnabled()
SettingsisAliasEnabled in interface Settingspublic void setAliasEnabled(boolean enabled)
public void setPersistAlias(boolean persist)
public boolean doPersistAlias()
SettingsdoPersistAlias in interface Settingspublic void setQuitHandler(QuitHandler qh)
public QuitHandler getQuitHandler()
SettingsgetQuitHandler in interface Settingspublic void setInterruptHook(InterruptHook hook)
public boolean hasInterruptHook()
SettingshasInterruptHook in interface Settingspublic InterruptHook getInterruptHook()
SettingsgetInterruptHook in interface Settingspublic void enableOperatorParser(boolean enable)
public boolean isOperatorParserEnabled()
SettingsisOperatorParserEnabled in interface Settingspublic void switchMode()
SettingsswitchMode in interface Settingspublic boolean isManEnabled()
SettingsisManEnabled in interface Settingspublic void setManEnabled(boolean enabled)
public AeshContext getAeshContext()
SettingsgetAeshContext in interface Settingspublic void setAeshContext(AeshContext aeshContext)
public java.io.File getExportFile()
SettingsgetExportFile in interface Settingspublic void setExportFile(java.io.File exportFile)
public boolean isExportEnabled()
SettingsisExportEnabled in interface Settingspublic void setExportEnabled(boolean exportEnabled)
public void setPersistExport(boolean persistExport)
SettingssetPersistExport in interface Settingspublic boolean doPersistExport()
SettingsdoPersistExport in interface Settingspublic void setExportUsesSystemEnvironment(boolean isLoad)
SettingssetExportUsesSystemEnvironment in interface Settingspublic boolean doExportUsesSystemEnvironment()
SettingsdoExportUsesSystemEnvironment in interface Settingspublic void setResource(Resource resource)
SettingssetResource in interface Settingspublic void setExecuteAtStart(java.lang.String execute)
setExecuteAtStart in interface Settingsexecute - specify a string that will be pushed to the input stream at startpublic java.lang.String getExecuteAtStart()
getExecuteAtStart in interface Settingspublic void setExecuteFileAtStart(Resource executeFileAtStart)
setExecuteFileAtStart in interface SettingsexecuteFileAtStart - file that will be read, parsed and executed at startpublic Resource getExecuteFileAtStart()
getExecuteFileAtStart in interface Settingspublic Resource getResource()
getResource in interface Settings