Hide Comments
Purpose:Retains global command history, directory history, alias and user function lists in memory when TCC is not running

 

Format:SHRALIAS [/U]

 

/U(nload)

 

Usage:

 

When you close all TCC sessions, the memory for the global command history, global directory history, global alias and global function lists is released. If you want the lists to be retained in memory even when TCC is not running, you need to execute SHRALIAS.

 

The SHRALIAS command starts and initializes SHRALIAS.EXE, a small program which remains active and retains global lists when TCC is not running. SHRALIAS.EXE must be stored in the same directory as TCC or in a directory on your PATH. You cannot run SHRALIAS.EXE directly, it must be invoked internally by the SHRALIAS command.

 

Once SHRALIAS has been executed, the global lists will be retained in memory until you use SHRALIAS /U to unload the lists, or until you shut down your operating system.

 

If you have an environment variable named SHRALIAS_SAVE_PATH, SHRALIAS will save the alias, history, dirhistory, and function lists to the path specified by SHRALIAS_SAVE_PATH when SHRALIAS exits. The files will be saved in Unicode format as alias.sav, history.sav, dirhistory.sav, and function.sav.

 

SHRALIAS will not work unless you have at least one copy of TCC running with global alias, global function, global command history, or global directory history enabled. If no global list is found, SHRALIAS will display an error.

 

If you start SHRALIAS from a temporary TCC session which exits after starting SHRALIAS, the TCC session may terminate and discard the shared lists before SHRALIAS can attach to them. In this case SHRALIAS.EXE will not be loaded. If you experience this problem, add a short delay with the DELAY command after SHRALIAS is loaded and before your session exits.

 

SHRALIAS will not work in detached sessions (i.e., those started with DETACH, or with the AT utility), due to security issues within Windows. Therefore the SHRALIAS command is ignored for detached sessions.

 

For more information about global histories, function and alias lists, see Local and Global History Lists, Local and Global Functions, Local and Global Aliases.

 

Option:

 

/UShuts down SHRALIAS.EXE. All global command history, directory history, function and alias lists will be released from memory when the last copy of TCC exits unless SHRALIAS is loaded again before that time.