fixing bugs, update README,Help; adding .gitignore

This commit is contained in:
Florian Walther committed 2026-10-03 16:51:55 +02:00
1 parent 847b6cd5c6
commit d5c3d03a21
4 files changed
+598 -42

No files matched your search

+19 -5
View File
@@ -14,15 +14,29 @@ Built-in commands:
help - Show this help
Features:
- Argument parsing with quotes and escapes
- Ctrl+D to exit, Ctrl+C to cancel
- Command history (up/down arrows)
- Argument parsing with quotes and escapes ('...' is literal,
"..." expands variables, \ escapes the next character)
- Ctrl+D to exit, Ctrl+C to cancel the current line or command
- Command history (up/down arrows), stored in
$XDG_STATE_HOME/gosh/history (default ~/.local/state/gosh/history,
override with $GOSH_HISTFILE); lines starting with a space are not saved
- Tab completion for commands and file paths
- Tilde expansion (~, ~/path)
- Environment variable expansion ($VAR, ${VAR})
- Tilde expansion (~, ~/path) at the start of unquoted words
- Environment variable expansion ($VAR, ${VAR}, ${VAR:-default});
using an unset variable is an error, use ${VAR:-} for an empty default
```
### Sicherheitshinweise
- Die History liegt in `$XDG_STATE_HOME/gosh/history` (Standard: `~/.local/state/gosh/history`) und ist nur für den eigenen Benutzer lesbar (Verzeichnis `0700`, Datei `0600`). Mit `GOSH_HISTFILE` lässt sich ein anderer Pfad setzen, mit `GOSH_HISTFILE=` wird die History abgeschaltet.
- Zeilen, die mit einem Leerzeichen beginnen, werden nicht in der History gespeichert – praktisch für Befehle mit Passwörtern oder Tokens.
- Innerhalb von `'...'` wird nichts expandiert, `\$` ergibt ein wörtliches `$`.
- Eine nicht gesetzte Variable bricht den Befehl ab (wie `set -u`), damit z. B. `rm -rf $DIR/out` nie mit leerem `$DIR` ausgeführt wird. Für einen Standardwert `${VAR:-default}` bzw. `${VAR:-}` verwenden.
- Variablenwerte werden nicht in mehrere Wörter aufgeteilt.
- Steuerzeichen in Verzeichnisnamen werden im Prompt escaped angezeigt (z. B. `\x1b`), Dateien mit Steuerzeichen im Namen werden nicht vervollständigt.
- Ctrl+C beendet nur den laufenden Befehl bzw. verwirft die aktuelle Zeile, nicht die Shell.
_gosh is not meant for production use, it is just a proof of concept._
## building