33 lines
840 B
Markdown
33 lines
840 B
Markdown
`gosh` eine einfache Shell, geschrieben in golang.
|
|
|
|
```
|
|
gosh - Go Shell
|
|
|
|
Built-in commands:
|
|
cd [dir] - Change directory (cd with no args goes to home)
|
|
pwd - Print working directory
|
|
echo [args] - Echo arguments
|
|
exit [code] - Exit shell with optional status code
|
|
quit [code] - Quit shell with optional status code
|
|
set VAR=val - Set environment variable
|
|
export VAR=val - Export environment variable
|
|
help - Show this help
|
|
|
|
Features:
|
|
- Argument parsing with quotes and escapes
|
|
- Ctrl+D to exit, Ctrl+C to cancel
|
|
- Command history (up/down arrows)
|
|
- Tab completion for commands and file paths
|
|
- Tilde expansion (~, ~/path)
|
|
- Environment variable expansion ($VAR, ${VAR})
|
|
|
|
```
|
|
|
|
_gosh is notmeant for production use, it is just a proof of concept._
|
|
|
|
## building
|
|
|
|
```bash
|
|
go build ./
|
|
```
|