ESHEC Software Command Line Interface Table Of Contents I. Introduction ................................................. 1 II. Program Abstract ............................................. 1 What is CLI? ................................................. 1 What does CLI do for me? ..................................... 1 How do I install and startup CLI? ............................ 2 Some definitions before we begin ............................. 3 Notes ........................................................ 3 The CLI command line ......................................... 4 III. CLI Commands ................................................ 5 CLEAR ........................................................ 5 DEFINE ....................................................... 5 LOGICAL .................................................. 5 SYMBOL ................................................... 6 VERIFY ................................................... 6 DOS .......................................................... 6 EXIT (QUIT) .................................................. 6 GETFL (@) ................................................... 6 RECALL ....................................................... 6 SHOW ......................................................... 6 CORE ..................................................... 6 DATE ..................................................... 6 ENVIRONMENT .............................................. 6 LOGICAL .................................................. 7 SYMBOL ................................................... 7 TIME ..................................................... 7 VERSION .................................................. 7 SD ........................................................... 7 IV. Notes ......................................................... 8 V. Appendix A. Some examples ................................... 9 VI. Appendex B. CLI and DESQview ............................... 10 VII. Appendix C. CLI knows problems ............................. 11 Introduction Thank you for your interest in ESHEC Software. ESHEC software is a company committed to providing quality shareware software at reasonable prices. The software you have obtained is shareware. It is NOT freeware nor has it been placed in the public domain. We at ESHEC software believe in the shareware process and have thus made CLI available. You are granted a limited right to use license for a period of thirty days, after which time you must discontinue use or register. We hope you enjoy using CLI during your free trial period. If you like it, tell your friends, if not please tell us. What is CLI? CLI is a DOS Command Line Interface program that extends the capabili- ties of the DOS command line. CLI is NOT and was never intended to be a DOS shell program. If you are the type of PC user that almost never uses the DOS command line or are new to the PC then CLI can help you during the learning process. On the other hand, if you are an experienced user and find yourself frequently using DOS then the power of CLI shines. CLI was written because the developers at ESHEC, who are consultants and teachers in data processing, use DOS commands regularly when assisting clients and students. They were unable to find a command line enhancer that they liked - so they wrote their own. What does CLI do for me? CLI extends the DOS command line by providing: command line editing capabilities (both insert and overstrike toggled by the INSERT key), command line recall (using the up and down arrows or popup menu selection), command string pre-definitions with parameters, command chaining, logged device and working directory change, and program launching. You can also: add or remove directories from your current path, launch programs without starting another copy of COMMAND.COM, and terminate CLI at any time (CLI is NOT written as a TSR). CLI helps the new user to DOS by allowing you to customize DOS commands that you may find confusing or to complex to remember. CLI allows you to assign your own name to any DOS command. Every user of a DOS based machine will at sometime be faced with having to use DOS commands. While there are many great shell programs on the market that attempt to make this infrequent, the time will come that the only way out of a problem is to go down to the DOS level. The less you use something the more confusing its use becomes, that's where CLI comes in. By allowing you to associate your own names to commands, names which you are more likely to remember, this confusion is eliminated. CLI lets YOU make the choice. For example, suppose you need to format a low densi- ty 3.5" floppy in a high density drive. What is the DOS command to do that? Assume that your 3.5" drive is drive B one option is: FORMAT B: /n:9 /t:80 Who can possibly remember that?? (Never mind that, who would WANT to remember that??). Using CLI it is possible to give that entire command a name and from that point on, using the new name, CLI will know that you want to format a low density 3.5" floppy in high density drive B. When you get to the advanced options, you'll see that it is also possible to create generic names and specify options when you use them. The new names that you create are called SYMBOLS. We call them symbols because they are in effect synonyms for the actual commands. How do I install and startup CLI? CLI requires two files: CLISW.EXE Program file. CLISETUP.DAT File to hold command string pre-definitions. These two files should be on the distribution. If not, DO NOT USE the copy of CLI you have obtained and contact ESHEC Software. Copy both to the same directory. It may be any directory you wish, although we do recommend that it be included on your PATH statement. For example: COPY A:\CLI*.* C:\BIN If you have downloaded CLI from a BBS, CLI has been provided as an archive file. The two required files and this DOC file are all in the archive. To start CLI, simply type CLISW at the DOS command line and enjoy! Some definitions In order to use the full potential of CLI, you must understand some of the terms used through out this document and how CLI looks at these terms. 1. KEYWORD The portion of the command line CLI considers to be the command. The keyword is the sequence of characters on the command line until the first space is found. For example in the following string LI is considered the keyword: LI myfile.txt 2. SYMBOL A name given to a pre-defined character string. Symbols may be used in place of a keyword or may be used as part of the keyword parameters. 2. Logical A name given to a pre-defined character string that contains a device and directory path. Logical names may be used anywhere a device and directory path would be specified. 4. Parameter An object operated upon by the keyword. For example in the keyword example above, myfile.txt is the parameter. Other things worth noting: 1. Parameters are separated from their keywords by at least one space. 2. Parameters are separated from each other by at least one space. 3. When logical names are used in the parameter string (except on the SHOW command) they must be followed by a colon. For example: if C_BIN and D_BIN are logical names defined as c:\bin and d:\bin respectively, then in order to use the logical names in a DOS copy operation you would key the line as follows: > copy c_bin:myfile.txt d_bin:myfile.txt or > copy c_bin:myfile.txt d_bin (note no colon needed after d_bin in this example) 4. A symbol lookup is always done for keywords, therefore no special indication need be given to use a symbol as a command. 5. Symbols may also be defined as translating to a device and directory path, but symbol names may not be used in place of logical names. 6. Symbols values may be used in the parameter portion of the command line if the symbol name is enclosed in apostrophes. For example: if FL is a symbol that translates to c:\t\tc\bin\tc.exe, then the following command would copy c:\t\tc\bin\tc.exe to the current working directory: copy 'fl' The CLI command line CLI looks at the command line as two parts. The first part (delimited by a space) is called the keyword (or command) and the second part (the rest of the command line) is considered the parameters to the keyword. The logic CLI uses when processing a command, stated simply, is as follows: 1. Break command line into its parts (keyword and parameters) 2. Check if keyword is a symbol, if it is: replace keyword with the value of the symbol, search replaced value for parameter substitution characters and replace where necessary. 3. Scan parameter string for symbol substitution characters and replace where necessary. 4. Lookup keyword in internal command table, branch to internal command dispatcher if found, prompt again. 5. Pass entire command string to DOS, prompt again CLI also allows for command chaining when commands are entered on the command line. Multiple commands may be entered separating each with a semicolon. For example suppose you wanted to change your current working directory to EXPE- DITE on the current logged device and execute the batch file EXP.BAT in that directory. To do so you could key them as separate commands or key them as chained commands. First as separate commands: > cd \expedite > exp As Chained commands: > cd \expedite;exp CLI Internal Commands The commands in this section are all processed by CLI internally. Gener- ally you need not spell out an entire internal command in order to get CLI to execute it. Only the number of characters needed to make the command unique need be specified. For example, to distinguish between the DEFINE and DOS commands, you would need to specify DE for DEFINE and DO for DOS, whereas you need only specify C for the CLEAR command because it is currently the only internal command that begins with an C. We do not recommend using abbrevia- tions in command definition files as future releases of CLI may include new internal commands that would cause your abbreviations to no longer be unique. CLEAR CLEAR Clear Clears the screen and displays the running banner on line one. DEFINE DEFINE