* A single '.' on an input line which is not inside of an incomplete
Tcl line group is treated as a (momentary) end-of-input by the REPL.
+(footnote: "REPL" is short for "Read, Evaluate, Print Loop.)
* The shell's dot commands, while not visible via \[info commands\],
are discoverable by the "unknown" command and will be executed
if their names (with the '.' prefix) would be found and resolved
unambiguously in the shell execution environment.
-Commands whose names begin with '.' which are not found unique in the
+Commands whose names begin with '.' which are not found uniquely in the
shell execution environment produce an "invalid command name" error.
Except for that treatment, the unknown command in effect
-acts like the stock, Tcl version.
-(That stock version remains available as _original_unkown,
-to which non-. commands are delegated .)
+acts like the standard Tcl version.
+(footnote: That version remains available as _original_unkown,
+to which non-dot commands are delegated .)
-* A few, non-stock-Tcl commands are available, in particular:
+* A few non-standard-Tcl commands are available. In particular:
+ Commands udb and shdb act nearly like commands creatable
by the "sqlite3" Tcl package to represent an open database. They
that the shell execution environment implements.
+ Command register_adhoc_command permits a newly (or oldly) defined
-Tcl command, likely with a leading '.' in its name, to associate
-help text with the shell. In this way, .help output can emit help
+Tcl command, likely with a leading '.' in its name, to be associated
+by name with some help text in a table kept by the shell
+for augmentation of its .help facility.
+In this way, the .help command can emit help
text, in summary or long forms, for Tcl commands that might be
executable from the shell execution environment.
(More on this below.)
- + Finally, command .. exists for reasons made clear below.
-With no arguments,
+ + Finally, the command ".." (sans quotes) exists for reasons made
+evident below. With no arguments,
it does nothing, quietly and successfully, with the empty result.
* The present implementation does not run the event loop processing
tcl% proc .do {what} {
> .eval $what
> }
- tcl% register_adhoc_command {do Does whatever one thing it is told to do
+ tcl% register_adhoc_command {.do Does whatever one thing it is told to do
> from the shell execution environment and little else}
tcl% # Time to return to shell execution environment.
tcl% .
tcl% # Apparently, it either gets to the Tcl environment or stays there.
```
-The use of lone . and .. to switch environments are easiest to understand.
-However, .. , when not alone on an input line enables some other uses of Tcl,
-explained in the next section.
+The use of lone . and .. to switch environments is easiest to understand.
+However, as explained in the next section,
+use of .. not alone on an input line exploits other Tcl functionality.
Another effect of loading tclshext is that a new dot command, .tcl ,
becomes part of the shell's repertoire.
-When entered no argument(s),
+When entered without any argument(s)
from the shell execution environment,
the .tcl command has the same effect as .. by itself.
(footnote:
that causes argument collection and expansion to be performed
according to Tcl rules by the Tcl interpreter,
without entering and staying in the Tcl execution environment.
-These two variations exist (where "..." is the provide argument set):
+These two variations exist (where "..." stands for the provided argument set):
```
sqlite> ..dotcmd ...
or
.
```
-Whenever more than one '.' leads an input line group,
-when it is submitted in the shell execution environment,
-then most of the line group is given to the Tcl interpreter for
+Whenever '..' leads an input line group
+submitted in the shell execution environment,
+then most of that input is given to the Tcl interpreter for
processing on a one-shot basis.
## Cross-Execution Environment Interactions ##
passed to the Tcl command named "unknown".
In the tclshext-augmented Tcl environment,
that procedure is implemented by C code which treats
-commands with a leading '.' specially,
-by attempting to find them in the shell's repertoire of dot commands.
-If found (unambiguously), they are executed then,
+a purported command with a leading '.' specially,
+by attempting to find it in the shell's repertoire of dot commands.
+If found (unambiguously), it is then executed
and the result (such as it is) returned to the caller.
+(footnote: The sqlite3 dot commands return the empty result on success.)
So, assuming there is a dot command invokable as .dotcmd,
-(which could happen if another extension provided it),
+(which there could be if another extension provided it),
it can be found and executed from the Tcl execution environment
with arguments as collected and expanded by the Tcl interpreter.
It should be noted, for those new to Tcl, that brace-quoting in Tcl
means "Whatever is between these matching braces is the (single) value."
-It can be used for nearly any content, except for unmatched braces.
+It can be used for nearly any content, except for mismatched braces.
## Summary, More to Come ##
-C Tcl\sextension\sdoc,\sminor\sclarifications\sand\sspelling\simprovements
-D 2022-04-11T23:08:36.402
+C Further\sclarification\sof\sTcl\sextension\sintro.
+D 2022-04-12T10:06:21.517
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F doc/lemon.html efc0cd2345d66905505d98f862e1c571512def0ceb5b016cb658fd4918eb76a3
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
F doc/shell_extend.html c2ce1584bd976613c984a0b7ea4680ef2d2c0ab0642540d730e0a899648e2294
-F doc/tcl_extension_intro.md 335c738ac1b8fdd931d8be0e9bb6b06f5762e0a80f3e447fa80e681d4536d889
+F doc/tcl_extension_intro.md ae73513f2443c65bdae35a733fdc5f3cef7c8674e7915b1e4355dd6af8a8ae23
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 1a117b0388d61f72d1f5947c9092ab5b6fffda32c438baadaef3187dc52bd7ca
-R efb1b2ab8e5e6e0af9d3cf9e018beeb0
+P 6ccdd9b7519bf8945c5187742c8ea9c335cb6a89b87f6b005bf2ba9dc6890b2f
+R 4a0f912c8f980bd74e9d39fc8fe464fe
U larrybr
-Z e7158dd219ace34680f76887495ba3e4
+Z e768dbcccb579b99dc457c9712116706
# Remove this line to create a well-formed Fossil manifest.