diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-27 16:23:41 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-27 16:26:24 -0500 |
| commit | 91a329eeb75519795137b48fa1d3df64a82db980 (patch) | |
| tree | be31fb25160259dde54d9b19488888bb2f90374c /spec | |
| parent | c376c359e39eaa255ccb6a4962e4985e55c90c0f (diff) | |
Specify and support •wdpath
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/system.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/system.md b/spec/system.md index b7c66ce9..872126c3 100644 --- a/spec/system.md +++ b/spec/system.md @@ -38,6 +38,7 @@ The option `repl` indicates how variables are retained across calls: with "none" | `•args` | Arguments passed to current file | `•path` | Current file's path | `•name` | Current filename +| `•wdpath` | Shell's working directory path | `•Exit` | Leave the top-level running program `•Import` loads another BQN script. The script is evaluated in its own isolated scope, and its result is either the result of the last line, or a module if it exports with `⇐` at the top level. If it is a module, then it must be destructured immediately unless first-class namespaces are possible. @@ -50,6 +51,8 @@ The right argument is a filename, which may be relative or absolute. Relative pa `•name` gives the name, including the extension, of the file in which it appears. It doesn't include the path. +`•wdpath` returns the path of the current working directory, like the Unix `pwd` command, but including a trailing slash. + `•Exit` immediately terminates the running BQN process. If the argument is a valid return code (on Unix, an integer), it is returned; otherwise, the default return code (the one returned when the end of the program is reached) is used. ## Files |
