summaryrefslogtreecommitdiff
path: root/go.sum
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-22 09:40:38 +0200
committerPaul Buetow <paul@buetow.org>2026-02-22 09:40:38 +0200
commitf78a185364ee24bc8c46d4aa6cc96d705faab326 (patch)
treec0944b0ba4a1069abe36271dd4090bd705c99173 /go.sum
parenta76ed355954712e945b2f5da5929ca4c10dea0d2 (diff)
Implement shell package with readline vi mode and tab completion (task 358)
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>
Diffstat (limited to 'go.sum')
-rw-r--r--go.sum6
1 files changed, 6 insertions, 0 deletions
diff --git a/go.sum b/go.sum
index 4ee1b87..2d7624a 100644
--- a/go.sum
+++ b/go.sum
@@ -1,2 +1,8 @@
+github.com/ergochat/readline v0.1.3 h1:/DytGTmwdUJcLAe3k3VJgowh5vNnsdifYT6uVaf4pSo=
+github.com/ergochat/readline v0.1.3/go.mod h1:o3ux9QLHLm77bq7hDB21UTm6HlV2++IPDMfIfKDuOgY=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=