<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-04-26 11:57:37 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-04-26 11:57:37 +0100
commit0da98a3d83b5aa6ccae73658ef0692c4023bc70f (patch)
treeb360581836295c21aef03efe5fb6f0d3aeb3f5fc /README.md
parentc6b1341fab071ab9d9419dace857b826ddf2acf1 (diff)
downloadstred-go-0da98a3d83b5aa6ccae73658ef0692c4023bc70f.tar
Add Y and Z registers
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 032a71d..668e645 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@ I'm hoping it will be capable of nearly as much as jq, with comparable or better
## Usage
### Registers and Atoms
-Commands operate on data that is store in 'registers'. There are 3 registers: path, value and X.
+Commands operate on data that is store in 'registers'. There are 5 registers: path, value, X, Y and Z.
-The path register stores the global path from the root node to the current token, the value register stores the token itself and the X register is a general purpose register, good for keeping things for later.
+The path register stores the global path from the root node to the current token, the value register stores the token itself and the X, Y and Z registers are general purpose registers, good for keeping things for later.
With the following JSON being read:
```
@@ -162,5 +162,9 @@ With an understanding of subexes, we can look at the stred commands
| `o` | Do nothing |
| `x` | Swap the value register with the X register |
| `X` | Append the contents of the value register to the X register |
+| `y` | Swap the value register with the Y register |
+| `Y` | Append the contents of the value register to the Y register |
+| `z` | Swap the value register with the Z register |
+| `Z` | Append the contents of the value register to the Z register |
| `k` | Swap the value register with the path register |
| `K` | Append the contents of the value register to the path register |