View file File name : jed005.html Content :<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="hevea 2.35"> <link rel="stylesheet" type="text/css" href="jed.css"> <title>Starting JED</title> </head> <body > <a href="jed004.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="index.html"><img src="contents_motif.svg" alt="Up"></a> <a href="jed006.html"><img src="next_motif.svg" alt="Next"></a> <hr> <h2 id="sec5" class="section">4 Starting JED</h2> <p>Normally, <span style="font-weight:bold">jed</span> is started as</p><pre class="verbatim"> jed <file name> </pre><p> or </p><pre class="verbatim"> jed <file list> </pre><p>However, <span style="font-weight:bold">jed</span> also takes the switches defined in the following table: </p><pre class="verbatim"> Switch Meaning ------ ------- -batch run JED in batch mode. This is a non-interactive mode. -n do not load jed.rc (.jedrc) file. -g <n> goto line `n' in buffer -l <file> load `file' as S-Lang code. -f <function> execute S-Lang function named `function' -s <string> search forward for `string' -2 split window -i <file> insert <file> into current buffer. </pre><p>For example, the command line: </p><pre class="verbatim"> jed slang.c -g 1012 -s error -2 file.c -f eob </pre><p>will start up <span style="font-weight:bold">jed</span>, read in the file <span style="font-family:monospace">slang.c</span>, goto line 1012 of <span style="font-family:monospace">slang.c</span> and start searching for the string <span style="font-family:monospace">error</span>, split the window, read in <span style="font-family:monospace">file.c</span> and goto the end of the file.</p><p>If the <span style="font-family:monospace">-batch</span> parameter is used, it must be the first parameter. Similarly, if <span style="font-family:monospace">-n</span> is used, it must also be the first parameter unless used with the <span style="font-family:monospace">-batch</span> parameter in which case it must the second. <span style="font-weight:bold">jed</span> should only be run in batch mode when non–interactive operation is desired. For example, <span style="font-weight:bold">jed</span> is distributed with a file, <code class="verb">mkdoc.sl</code>, that contains S–Lang code to produce a help file for functions and variables. In fact, the help file <code class="verb">jed_funs.hlp</code> was created by entering</p><pre class="verbatim"> jed -batch -n -l mkdoc.sl </pre><p>at the command line.</p><p>Now suppose that you want to read in a file with the name of one of the switches, say <code class="verb">-2</code>. How can this be done? The answer depends upon the operating system. For Unix, instead of <span style="font-family:monospace">jed -2</span>, use <span style="font-family:monospace">jed ./-2</span>; for VMS, use <span style="font-family:monospace">jed []-2</span>. The case for MS-DOS is similar to Unix except that one must use the backslash.</p><p>It is possible to completely change <span style="font-weight:bold">jed</span>’s command line syntax through the use of the user defined function <code class="verb">command_line_hook</code>. In fact, the behavior described above is dictated by the value of <code class="verb">command_line_hook</code> as distributed in <code class="verb">site.sl</code>. See the section on hooks for details.</p> <hr> <a href="jed004.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="index.html"><img src="contents_motif.svg" alt="Up"></a> <a href="jed006.html"><img src="next_motif.svg" alt="Next"></a> </body> </html>