public class SettingsImpl extends Object implements Settings
| Modifier | Constructor and Description |
|---|---|
protected |
SettingsImpl() |
protected |
SettingsImpl(Settings baseSettings) |
| Modifier and Type | Method and Description |
|---|---|
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
|
File |
getAliasFile()
Location of alias file
|
String |
getBellStyle()
By default, bell style is noisy
NOTE: Not implemented yet
|
EditMode |
getEditMode()
Get EditMode based on os and mode
|
String |
getExecuteAtStart() |
Resource |
getExecuteFileAtStart() |
File |
getExportFile()
Get the export file
Defaults to ~/.aesh_export
|
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)
|
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
|
InterruptHook |
getInterruptHook()
Get interrupt hook
|
String |
getLogFile()
Get log file
|
Mode |
getMode()
Either Emacs or Vi mode.
|
String |
getName()
Get the name of the cli
|
KeyOperationManager |
getOperationManager()
Get KeyOperationManager
|
QuitHandler |
getQuitHandler()
Get quit handler
|
Resource |
getResource() |
PrintStream |
getStdErr()
If not set System.out is used
|
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(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 |
setExecuteAtStart(String execute) |
void |
setExecuteFileAtStart(Resource executeFileAtStart) |
void |
setExportEnabled(boolean exportEnabled) |
void |
setExportFile(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(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(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 |
setManEnabled(boolean enabled) |
void |
setMode(Mode editMode) |
void |
setName(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(PrintStream stdErr)
Set where output should go to
|
void |
setStdOut(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)
|
protected SettingsImpl()
protected SettingsImpl(Settings baseSettings)
public void resetToDefaults()
public void setName(String name)
name - namepublic 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 File getHistoryFile()
getHistoryFile in interface Settingspublic void setHistoryFile(File historyFile)
public int getHistorySize()
getHistorySize in interface Settingspublic void setHistorySize(int historySize)
historySize - sizepublic String getBellStyle()
getBellStyle in interface Settingspublic void setBellStyle(String bellStyle)
public boolean isAnsiConsole()
SettingsisAnsiConsole in interface Settingspublic void setAnsiConsole(boolean ansiConsole)
ansiConsole - is it an ansi compatible console?public InputStream getInputStream()
getInputStream in interface Settingspublic void setInputStream(InputStream inputStream)
inputStream - inputpublic PrintStream getStdOut()
public void setStdOut(PrintStream stdOut)
stdOut - outputpublic PrintStream getStdErr()
public void setStdErr(PrintStream stdErr)
stdErr - outputpublic Terminal getTerminal()
getTerminal in interface Settingspublic void setTerminal(Terminal terminal)
terminal - termpublic File getInputrc()
getInputrc in interface Settingspublic void setInputrc(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 String getLogFile()
getLogFile in interface Settingspublic void setLogFile(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(File file)
public 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 File getExportFile()
SettingsgetExportFile in interface Settingspublic void setExportFile(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(String execute)
setExecuteAtStart in interface Settingsexecute - specify a string that will be pushed to the input stream at startpublic 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 SettingsCopyright © 2024 JBoss by Red Hat. All rights reserved.