Title: | Atari ST, TT, & Falcon |
Notice: | Please read note 1.0 and its replies before posting! |
Moderator: | FUNYET::ANDERSON |
Created: | Mon Apr 04 1988 |
Last Modified: | Tue May 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1433 |
Total number of notes: | 10312 |
I've been writing programs again. Here's my latest: Tired of re-typing the same command over again, slightly edited? Try "CLE", a Mark Williams Shell Command Line Editor. CLE will let you type single letter command ("a"), which will call up a history of previous commands as well as some predefined commands. You can edit and then re-issue any command in the list. It's not quite VMS command line editing, but it's bedtter than nothing. It's all in PRNSYS::DUA1:[LOMICKAJ.HOBBY.ST]CLE.ZOO. Install it by putting CLE.PRG in your PATH (\bin folder), and execute the contents of CLE.MSH froum your profile. Then type "a" to see the command history. You may want to set your recall history larger. I think it defaults to 8. This program reads in the contents of each file on the command line, and allows the user to select one of the lines, edit it, and hit return. The edited result of the selected line is then output. The PATH is searched to locate the listed files. All of the editing is performed using BIOS routines. The file result is output with PRINTF. When properly installed, this program can be used to edit the command history of the Mark Williams C command shell, and execute the resulting command. In your profile, place the following line: set in .cmd a='set in .msh\.msh\history >$TMPDIR\cle.tmp;`cle.prg $TMPDIR\cle.tmp local.cmd global.cmd`' When installed in this way, the "a" command will bring up a screen containing the following: - Your command history - The contents of GLOBAL.CMD - The contents of LOCAL.CMD In your "bin" search path, you may optionally place a file "GLOBAL.CMD" that contans frequently issued command templates. Likewise, in each directory you can have a LOCAL.CMD. You may thenm select a command with the arrow keys, and edit it with the arrow keys, delete, and backspace. ESC will erase the command, and ^C will exit without issuing any command. RETURN or UNDO will exit and issue the command to the shell. It also understands ^N, ^P, ^K, ^U.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
642.1 | CLE, good idea! | PEARS::BOEHM | Irren ist m�nnlich | Tue Oct 24 1989 10:09 | 21 |
Hi Jeff, Your CLE for MSH is a good idea! Are Comments allowed?: 1) What should happen (with CLE installed), if the MSH-History is longer than one screen. (>22 entries). The history list is alway displayed from beginning. The 23rd and + entry is being written over the last entry on the screen. Is there a scrolling feature planned. Maybe i'm too unpatient. 2) Selecting a 'hist' (which is an alias for history in MSH) after the 'a' command from the thisplayed list, then MSH aborts with two bombs. 3) is it possible not to display the 'a' command itself (like in VMS, DCL-RECALL Command does not appear with RECALL/ALL). Regards. / Hilmar. | |||||
642.2 | PRNSYS::LOMICKAJ | Tue Oct 24 1989 11:57 | 39 | ||
> Your CLE for MSH is a good idea! I am pleased that you like it. > Are Comments allowed? Yes, of course. > 1) What should happen (with CLE installed), if the MSH-History is > longer than one screen. (>22 entries). The history list is alway > displayed from beginning. The 23rd and + entry is being written over the > last entry on the screen. Is there a scrolling feature planned. Maybe > i'm too unpatient. If the history + lines in GLOBAL.CMD + lines in LOCAL.CMD exceeds 22, the program fails (unless you set your screen to 50-line mode). If you want to make it scroll, I would be happy to use it that way. You have the sources, and although the MSH tricks for invoking it are somewhat cryptic, the C program itself is straightforward. > 2) Selecting a 'hist' (which is an alias for history in MSH) after the > 'a' command from the thisplayed list, then MSH aborts with two bombs. Whose problem is that? I suspect an MSH problem, but I'll look at it. The "hist" program uses some undocumented tricks for getting at the "right" command history. Apparently MSH keeps a separate history for command files, and the ".msh\.msh..." directory path reflects the command file nesting. Since the use of accent grave is treated by the shell like a command file, executing "hist" from CLE is likely to give unreasonable results. > 3) is it possible not to display the 'a' command itself (like in VMS, > DCL-RECALL Command does not appear with RECALL/ALL). I don't think so - just like it's not possible to enter the edited commands into the command history. You could just modify CLE to check for them and edit them out, if you find that they clutter your screen. As far as I know, you can't actually remove them from MSH's history. |