Skip to content

Commit f268b5b

Browse files
missing rocketsh vars
1 parent 7dee502 commit f268b5b

17 files changed

Lines changed: 374 additions & 313 deletions

docpages/user-guide/commands/rocketsh.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,28 @@ Display version and copyright information for the shell.
117117
```basic
118118
version
119119
```
120+
121+
### Variables
122+
123+
The rocketsh shell allows you to change certain variables that influence how the shell operates. These are:
124+
125+
#### PATH$
126+
127+
The `PATH$` variable is a list of directories that are searched for programs to run them. Each path in PATH$ (separated
128+
by semicolons, ';') is prepended to the command line to try and match a file. If a match is found by prepending this search
129+
path, the program is executed. So for example if your program is located at `/programs/tasks/foo` and you type `tasks/foo`,
130+
with the path containing `/programs`, the program will be found and ran. Note this is slightly different from how paths operate
131+
in other operating systems. The current directory cannot be included in the path as it has no direct representation.
132+
133+
If you want to run a program that is not in the path, you must provide the full path to the program from the file system root.
134+
135+
#### LIB$
136+
137+
This is the path where system libraries may be found. There can be only one active library path. Programs may optionally
138+
use this global variable when loading their libraries, but it is not mandatory to do so, for example if a program wishes to
139+
load its own libraries from some non-standard location.
140+
141+
#### PROMPT$
142+
143+
Changing the `PROMPT$` variable changes the displayed prompt of the shell to whatever you want. By default, `PROMPT$` has
144+
the value `"ROCKETSH"`. Changing `PROMPT$` to an empty string will cause it to display just `>`, like the BBC Micro.

docs/ERROR.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</ul>
108108
<dl class="section remark"><dt>Remarks</dt><dd><span class="tt">ERR</span> and <span class="tt">ERR$</span> are described on the </dd>
109109
<dd>
110-
<a class="el" href="variables.html">Variable Types</a> page.</dd></dl>
110+
<a class="el" href="rocketsh.html#variables">Variables</a> page.</dd></dl>
111111
<hr />
112112
<h3 class="doxsection"><a class="anchor" id="examples-127"></a>
113113
Examples</h3>

docs/basic-ref.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
</li>
107107
<li><b>Sequential execution.</b> Programs execute line by line, top to bottom, unless redirected with control statements (e.g. <span class="tt">GOTO</span>, <span class="tt">IF</span>, <span class="tt">PROC</span>, <span class="tt">FUNCTION</span>).</li>
108108
<li><b>Statements.</b> Each line must contain at least one valid statement, with any required parameters.</li>
109-
<li><b>Variables.</b> Four types of variables are available (see <a class="el" href="variables.html">Variable Types</a>). Variables may be:<ul>
109+
<li><b>Variables.</b> Four types of variables are available (see <a class="el" href="rocketsh.html#variables">Variables</a>). Variables may be:<ul>
110110
<li><b>Local</b> to the current program, or</li>
111111
<li><b>Inherited</b> by other programs run with <span class="tt">CHAIN</span> or similar mechanisms.</li>
112112
</ul>
@@ -117,7 +117,7 @@
117117
<p><b>Further Reference</b></p>
118118
<ul>
119119
<li><a class="el" href="basic-beginner.html">Beginners' Tutorial</a></li>
120-
<li><a class="el" href="variables.html">Variable Types</a></li>
120+
<li><a class="el" href="rocketsh.html#variables">Variables</a></li>
121121
<li><a class="el" href="keywords.html">Keywords</a></li>
122122
<li><a class="el" href="builtin-functions.html">Built-In Functions</a></li>
123123
<li><a class="el" href="audio-basics.html">Audio Introduction</a></li>

docs/doxygen_crawl.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@
942942
<a href="glossary.html#network-interface"/>
943943
<a href="glossary.html#pixel-art"/>
944944
<a href="glossary.html#program"/>
945-
<a href="glossary.html#prompt"/>
945+
<a href="glossary.html#prompt-1"/>
946946
<a href="glossary.html#prompt-string"/>
947947
<a href="glossary.html#ram-disk"/>
948948
<a href="glossary.html#retrofs"/>
@@ -1105,11 +1105,15 @@
11051105
<a href="rocketsh.html#built-in-commands"/>
11061106
<a href="rocketsh.html#cd--chdir"/>
11071107
<a href="rocketsh.html#command-line-entry"/>
1108+
<a href="rocketsh.html#lib"/>
11081109
<a href="rocketsh.html#multi-line-program-entry"/>
1110+
<a href="rocketsh.html#path"/>
1111+
<a href="rocketsh.html#prompt"/>
11091112
<a href="rocketsh.html#rocket-shell-commands"/>
11101113
<a href="rocketsh.html#run"/>
11111114
<a href="rocketsh.html#task"/>
11121115
<a href="rocketsh.html#up"/>
1116+
<a href="rocketsh.html#variables"/>
11131117
<a href="rocketsh.html#version"/>
11141118
<a href="saving-your-work.html"/>
11151119
<a href="saving-your-work.html#installed-system"/>

docs/glossary.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ <h3 class="doxsection"><a class="anchor" id="mount"></a>
118118
<h3 class="doxsection"><a class="anchor" id="program"></a>
119119
Program</h3>
120120
<p>A file written in BASIC that Retro Rocket can run. Programs live in <span class="tt">/programs</span>.</p>
121-
<h3 class="doxsection"><a class="anchor" id="prompt"></a>
121+
<h3 class="doxsection"><a class="anchor" id="prompt-1"></a>
122122
Prompt</h3>
123123
<p>The <span class="tt">&gt;</span> symbol you see in the shell where you type commands.</p>
124124
<h3 class="doxsection"><a class="anchor" id="ram-disk"></a>

docs/rocketsh.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,20 @@ <h4 class="doxsection"><a class="anchor" id="version"></a>
174174
version</h4>
175175
<p>Display version and copyright information for the shell.</p>
176176
<div class="fragment"><div class="line">version</div>
177-
</div><!-- fragment --> </div></div><!-- contents -->
177+
</div><!-- fragment --><h3 class="doxsection"><a class="anchor" id="variables"></a>
178+
Variables</h3>
179+
<p>The rocketsh shell allows you to change certain variables that influence how the shell operates. These are:</p>
180+
<h4 class="doxsection"><a class="anchor" id="path"></a>
181+
PATH$</h4>
182+
<p>The <span class="tt">PATH$</span> variable is a list of directories that are searched for programs to run them. Each path in PATH$ (separated by semicolons, ';') is prepended to the command line to try and match a file. If a match is found by prepending this search path, the program is executed. So for example if your program is located at <span class="tt">/programs/tasks/foo</span> and you type <span class="tt">tasks/foo</span>, with the path containing <span class="tt">/programs</span>, the program will be found and ran. Note this is slightly different from how paths operate in other operating systems. The current directory cannot be included in the path as it has no direct representation.</p>
183+
<p>If you want to run a program that is not in the path, you must provide the full path to the program from the file system root.</p>
184+
<h4 class="doxsection"><a class="anchor" id="lib"></a>
185+
LIB$</h4>
186+
<p>This is the path where system libraries may be found. There can be only one active library path. Programs may optionally use this global variable when loading their libraries, but it is not mandatory to do so, for example if a program wishes to load its own libraries from some non-standard location.</p>
187+
<h4 class="doxsection"><a class="anchor" id="prompt"></a>
188+
PROMPT$</h4>
189+
<p>Changing the <span class="tt">PROMPT$</span> variable changes the displayed prompt of the shell to whatever you want. By default, <span class="tt">PROMPT$</span> has the value <span class="tt">"ROCKETSH"</span>. Changing <span class="tt">PROMPT$</span> to an empty string will cause it to display just <span class="tt">&gt;</span>, like the BBC Micro. </p>
190+
</div></div><!-- contents -->
178191
</div><!-- PageDoc -->
179192
</div><!-- doc-content -->
180193
<div id="page-nav" class="page-nav-panel">

docs/search/all_14.js

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,50 @@ var searchData=
2020
['level_20layout_20informative_17',['2. High-level layout (informative)',['../retrofs.html#autotoc_md2-high-level-layout-informative',1,'']]],
2121
['lgetlastcpuid_20function_18',['LGETLASTCPUID Function',['../LGETLASTCPUID.html',1,'int-funcs']]],
2222
['lgetlastcpuid_2emd_19',['LGETLASTCPUID.md',['../LGETLASTCPUID_8md.html',1,'']]],
23-
['libraries_20',['Libraries',['../libraries.html#available-libraries',1,'Available Libraries'],['../libraries.html',1,'Libraries']]],
24-
['library_21',['Library',['../ansi.html',1,'ANSI Library'],['../http.html',1,'HTTP Library'],['../mouse.html',1,'Mouse Library']]],
25-
['library_20keyword_22',['LIBRARY Keyword',['../LIBRARY.html',1,'keywords']]],
26-
['library_2emd_23',['LIBRARY.md',['../LIBRARY_8md.html',1,'']]],
27-
['lifecycle_24',['Module Lifecycle',['../modules.html#module-lifecycle',1,'']]],
28-
['lifecycle_20scheduler_20handshake_25',['Program lifecycle &amp;amp; scheduler handshake',['../basic-intdev.html#program-lifecycle--scheduler-handshake',1,'']]],
29-
['like_20a_20phone_20call_20reliable_20conversation_26',['TCP - Like a Phone Call (reliable conversation)',['../networking.html#tcp---like-a-phone-call-reliable-conversation',1,'']]],
30-
['like_20operations_27',['Arrays &amp;amp; list-like operations',['../basic-intdev.html#arrays--list-like-operations',1,'']]],
31-
['like_20sending_20a_20parcel_20quick_20independent_20messages_28',['UDP - Like Sending a Parcel (quick, independent messages)',['../networking.html#udp---like-sending-a-parcel-quick-independent-messages',1,'']]],
32-
['line_20endings_29',['Separators and line endings',['../PRINT.html#separators-and-line-endings',1,'']]],
33-
['line_20entry_30',['Command line entry',['../rocketsh.html#command-line-entry',1,'']]],
34-
['line_20keyword_31',['LINE Keyword',['../LINE.html',1,'keywords']]],
35-
['line_20numbering_20auto_20number_20and_20execution_32',['Line numbering, auto-number, and execution',['../basic-intdev.html#line-numbering-auto-number-and-execution',1,'']]],
36-
['line_20numbers_20permitted_33',['Example: simple subroutine (line numbers permitted)',['../GOSUB.html#example-simple-subroutine-line-numbers-permitted',1,'']]],
37-
['line_20program_20entry_34',['Multi-line program entry',['../rocketsh.html#multi-line-program-entry',1,'']]],
38-
['line_2emd_35',['LINE.md',['../LINE_8md.html',1,'']]],
39-
['linux_36',['Linux',['../creating-boot-media.html#linux',1,'']]],
40-
['linux_20advanced_37',['Linux (advanced)',['../creating-boot-media.html#linux-advanced',1,'']]],
41-
['linux_20recommended_20tools_38',['Linux (recommended tools)',['../creating-boot-media.html#linux-recommended-tools',1,'']]],
42-
['list_20command_39',['list command',['../list.html',1,'commands']]],
43-
['list_20full_20pathname_40',['list [full pathname]',['../list.html#list-full-pathname',1,'']]],
44-
['list_20like_20operations_41',['Arrays &amp;amp; list-like operations',['../basic-intdev.html#arrays--list-like-operations',1,'']]],
45-
['list_2emd_42',['list.md',['../list_8md.html',1,'']]],
46-
['live_43',['Where programs live',['../working-with-programs.html#where-programs-live',1,'']]],
47-
['livecd_44',['LiveCD',['../glossary.html#livecd',1,'']]],
48-
['livecd_20mode_45',['LiveCD mode',['../saving-your-work.html#livecd-mode',1,'']]],
49-
['livecd_20or_20liveusb_46',['1. Boot the LiveCD or LiveUSB',['../installation.html#autotoc_md1-boot-the-livecd-or-liveusb',1,'']]],
50-
['liveusb_47',['1. Boot the LiveCD or LiveUSB',['../installation.html#autotoc_md1-boot-the-livecd-or-liveusb',1,'']]],
51-
['ljust_24_20function_48',['LJUST$ Function',['../LJUST.html',1,'string-funcs']]],
52-
['ljust_2emd_49',['LJUST.md',['../LJUST_8md.html',1,'']]],
53-
['load_50',['SOUND LOAD',['../SOUND.html#sound-load',1,'']]],
54-
['load_20newline_20separated_20integers_20from_20a_20file_51',['Example: load newline-separated integers from a file',['../DATA.html#example-load-newline-separated-integers-from-a-file',1,'']]],
55-
['loader_20pipeline_52',['Loader Pipeline',['../modules.html#loader-pipeline',1,'']]],
56-
['local_20keyword_53',['LOCAL Keyword',['../LOCAL.html',1,'keywords']]],
57-
['local_2emd_54',['LOCAL.md',['../LOCAL_8md.html',1,'']]],
58-
['locals_20within_20a_20definition_55',['Example: locals within a definition',['../DEF.html#example-locals-within-a-definition',1,'']]],
59-
['log_20function_56',['LOG Function',['../LOG.html',1,'real-funcs']]],
60-
['log_2emd_57',['LOG.md',['../LOG_8md.html',1,'']]],
61-
['logo_20and_20system_20info_20scrolling_20with_20text_58',['Example: Keep a logo and system info scrolling with text',['../SCROLLREGION.html#example-keep-a-logo-and-system-info-scrolling-with-text',1,'']]],
62-
['loop_20scope_59',['Loop scope',['../ENDPROC.html#loop-scope',1,'Loop scope'],['../RETURN.html#loop-scope-1',1,'Loop scope']]],
63-
['loopback_60',['Loopback',['../glossary.html#loopback',1,'']]],
64-
['lower_24_20function_61',['LOWER$ Function',['../LOWER.html',1,'string-funcs']]],
65-
['lower_2emd_62',['LOWER.md',['../LOWER_8md.html',1,'']]],
66-
['ltrim_24_20function_63',['LTRIM$ Function',['../LTRIM.html',1,'string-funcs']]],
67-
['ltrim_2emd_64',['LTRIM.md',['../LTRIM_8md.html',1,'']]]
23+
['lib_24_20',['LIB$',['../rocketsh.html#lib',1,'']]],
24+
['libraries_21',['Libraries',['../libraries.html#available-libraries',1,'Available Libraries'],['../libraries.html',1,'Libraries']]],
25+
['library_22',['Library',['../ansi.html',1,'ANSI Library'],['../http.html',1,'HTTP Library'],['../mouse.html',1,'Mouse Library']]],
26+
['library_20keyword_23',['LIBRARY Keyword',['../LIBRARY.html',1,'keywords']]],
27+
['library_2emd_24',['LIBRARY.md',['../LIBRARY_8md.html',1,'']]],
28+
['lifecycle_25',['Module Lifecycle',['../modules.html#module-lifecycle',1,'']]],
29+
['lifecycle_20scheduler_20handshake_26',['Program lifecycle &amp;amp; scheduler handshake',['../basic-intdev.html#program-lifecycle--scheduler-handshake',1,'']]],
30+
['like_20a_20phone_20call_20reliable_20conversation_27',['TCP - Like a Phone Call (reliable conversation)',['../networking.html#tcp---like-a-phone-call-reliable-conversation',1,'']]],
31+
['like_20operations_28',['Arrays &amp;amp; list-like operations',['../basic-intdev.html#arrays--list-like-operations',1,'']]],
32+
['like_20sending_20a_20parcel_20quick_20independent_20messages_29',['UDP - Like Sending a Parcel (quick, independent messages)',['../networking.html#udp---like-sending-a-parcel-quick-independent-messages',1,'']]],
33+
['line_20endings_30',['Separators and line endings',['../PRINT.html#separators-and-line-endings',1,'']]],
34+
['line_20entry_31',['Command line entry',['../rocketsh.html#command-line-entry',1,'']]],
35+
['line_20keyword_32',['LINE Keyword',['../LINE.html',1,'keywords']]],
36+
['line_20numbering_20auto_20number_20and_20execution_33',['Line numbering, auto-number, and execution',['../basic-intdev.html#line-numbering-auto-number-and-execution',1,'']]],
37+
['line_20numbers_20permitted_34',['Example: simple subroutine (line numbers permitted)',['../GOSUB.html#example-simple-subroutine-line-numbers-permitted',1,'']]],
38+
['line_20program_20entry_35',['Multi-line program entry',['../rocketsh.html#multi-line-program-entry',1,'']]],
39+
['line_2emd_36',['LINE.md',['../LINE_8md.html',1,'']]],
40+
['linux_37',['Linux',['../creating-boot-media.html#linux',1,'']]],
41+
['linux_20advanced_38',['Linux (advanced)',['../creating-boot-media.html#linux-advanced',1,'']]],
42+
['linux_20recommended_20tools_39',['Linux (recommended tools)',['../creating-boot-media.html#linux-recommended-tools',1,'']]],
43+
['list_20command_40',['list command',['../list.html',1,'commands']]],
44+
['list_20full_20pathname_41',['list [full pathname]',['../list.html#list-full-pathname',1,'']]],
45+
['list_20like_20operations_42',['Arrays &amp;amp; list-like operations',['../basic-intdev.html#arrays--list-like-operations',1,'']]],
46+
['list_2emd_43',['list.md',['../list_8md.html',1,'']]],
47+
['live_44',['Where programs live',['../working-with-programs.html#where-programs-live',1,'']]],
48+
['livecd_45',['LiveCD',['../glossary.html#livecd',1,'']]],
49+
['livecd_20mode_46',['LiveCD mode',['../saving-your-work.html#livecd-mode',1,'']]],
50+
['livecd_20or_20liveusb_47',['1. Boot the LiveCD or LiveUSB',['../installation.html#autotoc_md1-boot-the-livecd-or-liveusb',1,'']]],
51+
['liveusb_48',['1. Boot the LiveCD or LiveUSB',['../installation.html#autotoc_md1-boot-the-livecd-or-liveusb',1,'']]],
52+
['ljust_24_20function_49',['LJUST$ Function',['../LJUST.html',1,'string-funcs']]],
53+
['ljust_2emd_50',['LJUST.md',['../LJUST_8md.html',1,'']]],
54+
['load_51',['SOUND LOAD',['../SOUND.html#sound-load',1,'']]],
55+
['load_20newline_20separated_20integers_20from_20a_20file_52',['Example: load newline-separated integers from a file',['../DATA.html#example-load-newline-separated-integers-from-a-file',1,'']]],
56+
['loader_20pipeline_53',['Loader Pipeline',['../modules.html#loader-pipeline',1,'']]],
57+
['local_20keyword_54',['LOCAL Keyword',['../LOCAL.html',1,'keywords']]],
58+
['local_2emd_55',['LOCAL.md',['../LOCAL_8md.html',1,'']]],
59+
['locals_20within_20a_20definition_56',['Example: locals within a definition',['../DEF.html#example-locals-within-a-definition',1,'']]],
60+
['log_20function_57',['LOG Function',['../LOG.html',1,'real-funcs']]],
61+
['log_2emd_58',['LOG.md',['../LOG_8md.html',1,'']]],
62+
['logo_20and_20system_20info_20scrolling_20with_20text_59',['Example: Keep a logo and system info scrolling with text',['../SCROLLREGION.html#example-keep-a-logo-and-system-info-scrolling-with-text',1,'']]],
63+
['loop_20scope_60',['Loop scope',['../ENDPROC.html#loop-scope',1,'Loop scope'],['../RETURN.html#loop-scope-1',1,'Loop scope']]],
64+
['loopback_61',['Loopback',['../glossary.html#loopback',1,'']]],
65+
['lower_24_20function_62',['LOWER$ Function',['../LOWER.html',1,'string-funcs']]],
66+
['lower_2emd_63',['LOWER.md',['../LOWER_8md.html',1,'']]],
67+
['ltrim_24_20function_64',['LTRIM$ Function',['../LTRIM.html',1,'string-funcs']]],
68+
['ltrim_2emd_65',['LTRIM.md',['../LTRIM_8md.html',1,'']]]
6869
];

0 commit comments

Comments
 (0)