-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation about '!' in REPL
- Loading branch information
Showing
4 changed files
with
74 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// SPDX-License-Identifier: GFDL-1.3-or-later | ||
// | ||
// Copyright © 2000-2023 Erick Gallesio <[email protected]> | ||
// Copyright © 2000-2024 Erick Gallesio <[email protected]> | ||
// | ||
// Author: Erick Gallesio [[email protected]] | ||
// Creation date: 26-Nov-2000 18:19 (eg) | ||
|
@@ -66,10 +66,7 @@ of available commands is given below. | |
|
||
- **,backtrace** (or **,bt**): Show the stack when last error occurred | ||
- **,cd**: Change current directory | ||
- **,pwd**: Print working directory | ||
- **,ls**: List directory content | ||
- **,quit** (or **,q**): Exit STklos | ||
- **,shell** (or **,!**): Run a shell command | ||
- **,time** (or **,t** ): Print the time used to run the next expression | ||
- **,describe** (or **,d**): Describe an object | ||
- **,expand** (or **,e**): Pretty print the macro expansion of a form | ||
|
@@ -83,6 +80,23 @@ of available commands is given below. | |
- **,help** (or **,?** or **,h*): Show help on REPL command with | ||
parameter. With a parameter, display the help of this parameter | ||
|
||
Furthermore, the **'!'** character can also be used to execute an | ||
external command using *sh(1)*. For instance, | ||
|
||
```scheme | ||
stklos> !pwd | ||
/tmp/test | ||
stklos> !emacs foo.stk & ;; to launch emacs on file foo.stk | ||
stklos> (define !pwd 100) | ||
;; !pwd | ||
stklos> !pwd ;; now !pwd overrides pwd(1) | ||
100 | ||
stklos> | ||
``` | ||
|
||
|
||
|
||
|
||
{{insertdoc 'repl-add-command}} | ||
|
||
==== REPL variables | ||
|
@@ -115,4 +129,3 @@ The following parameter objects can be used to customize the REPL: | |
|
||
{{insertdoc 'repl-theme}} | ||
{{insertdoc 'repl-show-startup-message}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters