History manager |
history() |
c = history() |
s = history('size') |
f = history('filename') |
l = history('enable_save') |
c = history('get') |
history('display') |
history('save') |
history('load') |
history('clear') |
history('duplicated') |
history('saveafter') |
history('removeexit') |
history('size', new_size) |
history('enable_save', true_false) |
history('delete', lines) |
history('append', str) |
history('filename', name) |
history('load', filename_history) |
history('save', filename_history) |
history('duplicated', true_false) |
history('removeexit', true_false) |
history('get', lines) |
history('saveafter', nb_commands) |
a integer value: new size max of history.
a logical.
a integer value or a vector of size 1x2.
a string.
a string: new default history filename
a string: filename
a integer value: number of commands.
a cell of strings.
a logical.
a integer value.
a string.
history() displays the current Nelson history.
c = history() returns the current Nelson history in a cell of strings.
s = history('size') returns history size max.
f = history('filename') returns the history filename.
l = history('enable_save') returns the history manager state.
c = history('get') returns the current Nelson history in a cell of strings.
history('display') displays the current Nelson history.
history('save') saves current history file.
history('load') load current history file.
history('clear') clears history.
history('duplicated') get state about save of consecutive duplicated commands.
history('saveafter') get state about save the history after nth commands.
history('removeexit') get state about do not save exit in history file.
history('size', new_size) set history size max with new_size.
history('enable_save', true_false) set the history manager state: false for 'off', true for 'on'.
history('delete', lines) deletes lines by index: a scalar value or a vector 1x2.
history('append', str) append command to history.
history('filename', name) set the history filename.
history('load', filename_history) load history file.
history('save', filename_history) save history file
history('duplicated', true_false) set state about consecutive duplicated commands. true remove duplicated.
history('removeexit', true_false) set state about do not save exit in history file.
history('get', lines)returns the current Nelson history in a cell of strings by index: a scalar value or a vector 1x2.
history('saveafter', nb_commands) saves the history file after nb_commands statements are added to the file.
Tips: You can easily share your history file in the cloud by adding few lines code in your user startup file.
If nelson launched with '--nouserstartup' option, history file will be not loaded at startup and not saved at exit.
Example to share your history file in OneDrive cloud
OneDrivePath = getenv('OneDrive');
if (strcmp(OneDrivePath, '') == false)
NelsonOneDrivePath = [OneDrivePath, '/Nelson'];
mkdir(NelsonOneDrivePath);
NelsonOneDrivePathFilename = [NelsonOneDrivePath, '/', 'Nelson.history'];
history('filename', NelsonOneDrivePathFilename);
history('load', NelsonOneDrivePathFilename);
end
history()
c = history()
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET