summaryrefslogtreecommitdiff
path: root/internal/shell/shell_test.go
AgeCommit message (Collapse)Author
2026-02-22Rename binary from geheim to foostorePaul Buetow
- go.mod: module path codeberg.org/snonux/geheim → codeberg.org/snonux/foostore - cmd/geheim/ → cmd/foostore/ - Magefile.go: binary/binaryName/mainPkg constants updated - internal/config: config file path ~/.config/geheim.json → ~/.config/foostore.json - All import paths and comments updated throughout - Delete geheim.rb (the original Ruby implementation, superseded by this Go rewrite) - CLAUDE.md rewritten to reflect the Go implementation, new binary name, build system (mage), and current package architecture Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22Implement shell package with readline vi mode and tab completion (task 358)Paul Buetow
Replaces the stub in internal/shell/shell.go with a full implementation backed by github.com/ergochat/readline. The Shell struct wraps a readline instance configured with vi mode, a 500-entry in-memory history limit, and a custom prefixCompleter that delegates tab expansion to a caller-supplied function — mirroring the Ruby CLI#setup_readline / Readline.completion_proc pattern. History deduplication (skip empty lines and consecutive duplicate entries) matches the Ruby shell_loop behaviour by disabling auto-save and calling SaveToHistory only for non-empty, non-duplicate lines. A package- level ReadPassword helper handles PIN entry before the Shell is created. Tests skip gracefully when stdin is not a TTY. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>