Legacy ID:KA373609
First you need to create a .nshrc file (or .zshrc for ZSH) in your users home directory. This may be "c:\users\<user>" on Windows or just "~/" on Unix. Once the file has been created place the following content inside:
# number of lines kept in history
export HISTSIZE=1000
# number of lines saved in the history after logout
export SAVEHIST=1000
# location of history
export HISTFILE=~/.nsh_history
# append command to history file once executed
setopt inc_append_history
Save the file .nshrc file with the above content. Next create the via the file as defined in HISTFILE variable, this can be done use the touch command or manually created with a text editor. Now when the NSH shell next starts it will save command history to the file HISTFILE and this will persist across sessions.
Related Products:
- BMC BladeLogic Server Automation Suite