Add issues #25, #26, #27; update #7 and #22 statuses

- #25: $VAR expansion in commands
- #26: Shell abbreviations and user-extensible builtins
- #27: $(cmd) subcommand syntax
- #22: Updated with implementation details (in progress)
- #7: Standardize status label
This commit is contained in:
Cormac Shannon
2026-03-15 19:33:19 +00:00
parent 5135b16375
commit 08df164692
5 changed files with 353 additions and 13 deletions

View File

@@ -13,6 +13,16 @@
`cmd` < "input.txt" -- redirect stdin from file
```
### Alternatively
```lua lush
`ls -l > output.txt` -- redirect stdout to file
`ls -l >> output.txt` -- append stdout to file
`cmd 2> err.txt` -- redirect stderr to file
`cmd 2>&1` -- merge stderr into stdout
`cmd < input.txt` -- redirect stdin from file
```
## Implementation
- Before `execvp()` in the child process, use `dup2()` to redirect file descriptors
@@ -26,3 +36,13 @@
## Challenge
`>` and `>>` conflict with Lua's greater-than and right-shift operators. Like piping, these operators must only be valid in command context. The parser can disambiguate because the left-hand side is a command expression.
## Alternatives
- Although shell redirection isnt available, simple redirection can be achieved using the `io` library.
```lua lush
file = io.open("OUTFILE.txt", "w")
file:write(`ls /`.stdout)
file:close()
```