SHRALIAS.EXE is the only program that uses (or even knows about) SHRALIAS_SAVE_PATH. If that variable is in SHRALIAS.EXE's environment, SHRALIAS.EXE will save 4 global lists there (history, dirhistory, aliases, and functions (the @functions) when it exits. It has worked well for many years. If library routines (I don't like calling them functions) become global/shared, SHRALIAS.EXE could be made to guard the new shared memory map as it does the others.
So should there be
1. Shralias_Function_Save_Path
2. Shralias_Alias_Save_Path
3. Shralias_History_Save_Path
4. Shralias_Dirhistory_Save_Path
That seems like flexibility for the sake of flexibility.
Those four lists can change without any file changing (history and dirhistory change all the time, there's ALIAS, FUNCTION, and ESET for changing the other two on the fly). So it's quite reasonable for SHRALIAS.EXE to save those when it exits (which for me is when I logoff).
Library routines cannot be changed/added until they're already in a saved file. SHRALIAS saving them seems ridiculous.
I still haven't figured out most of the current suggestions.