This file shows how you can configure 4DOS to keep a complete consolidated history of all commands entered at the 4DOS prompt. It will keep history on all commands regardless of whether they are from a primary or a secondary 4DOS shell. This allows you to "push to DOS" from a program and run commands, and they will be remembered in the 4DOS history list after you EXIT. Thanks to Mike Bessy of J.P. Software for the tricks that make this work. The Problem: You edit a program file or files in your editor. You push from your editor to DOS (4DOS) to do a compile. You enter several compile commands and discover errors. You EXIT back to your editor and fix the errors. You push to 4DOS to compile again. At this point, it would be nice to just press up arrow and get the previous compile commands you entered. This is a standard feature of MSDOS 5.0 DOSKEY or CED or PCED, but not 4DOS. Under 4DOS, the up arrow key will give you the command which invoked the editor. This is because 4DOS provides a separate history for each 4DOS shell. You started a new 4DOS shell when you "pushed" from your editor. The new shell "inherited" the history list of the parent shell, so you have the previous commands up to the editor command line. But after you run your new commands, the history is not passed back to the parent when you exit the shell. It is just discarded. So if you push to a secondary shell again, the commands you entered in the previous secondary shell are gone, and you can't recall your compile commands from history. The same thing happens when you exit from the editor. None of your compile commands you entered in the secondary shells you "pushed to" are remembered. A Solution: Here is how I configured 4DOS to save history from secondary shells. I have RAMDISK as drive E:. You may need to adjust directories and other things for your own configuration. 1) Put the following commands in AUTOEXEC.BAT: alias /r c:\4dos\alias.cmd copy c:\4dos\4exit.btm e: prompt %%@EXEC[readhist]$h$P$G 2) Have the following ALIAS defined in C:\4DOS\ALIAS.CMD: readhist = iff exist e:\history then ^ history /f ^ history /r e:\history ^ del /q e:\history ^ endiff (Note: the above is all one long line, not two lines.) 3) Have the following command in C:\4DOS\4EXIT.BTM: @history >!e:\history 4) Have the following command in C:\4DOS\4DOS.INI: 4StartPath = e:\ 5) Re-boot your computer to get everything to be set up with 4DOS (be sure you have a bootable floppy handy in case something is wrong and the system doesn't boot). How it works: Each time the 4DOS prompt is generated, the %@EXEC function in the PROMPT string causes 4DOS to execute alias READHIST. READHIST looks on RAM disk for a saved history file E:\HISTORY. If it finds it, it loads it into the history buffer and deletes the file. This E:\HISTORY file is created when a seconadary 4DOS shell is EXITed. The 4EXIT.BTM command causes the final history list of the secondary shell to be written to E:\HISTORY. The history will be reloaded at the next occurance of the 4DOS prompt. Suggestions: I would like to suggest to J.P. Software that they make an option in a future 4DOS version to allow a single consolidated history list. The technique described above works, but requires a disk access on every prompt. Using RAM disk, this is not noticeable, but the technique is obscure, at best. A consolidated history would record every command entered at a 4DOS prompt regardless of whether it was a primary or secondary shell. - Bob Snider, 70000,302, 1/9/92.