stinkpot:基于SQLite的Shell历史记录
摘要
Stinkpot是一个轻量级的、基于SQLite的bash Shell历史搜索工具,类似atuin但功能较少,约400行Go代码。
<p><a href="https://lobste.rs/s/bvgaff/stinkpot_sqlite_backed_shell_history">评论</a></p>
查看缓存全文
缓存时间: 2026/07/25 10:02
# oppi.li/stinkpot 来源:https://tangled.org/oppi.li/stinkpot 2 (https://tangled.org/oppi.li/stinkpot/stars) ### 配置推送 议题|拉取请求|提交|标签 选择你想在推送中包含的活动类型\. sqlite\-backed shell history 2 (https://tangled.org/oppi.li/stinkpot/stars) ### 配置推送 议题|拉取请求|提交|标签 选择你想在推送中包含的活动类型\. 4 (https://tangled.org/oppi.li/stinkpot/commits/main)1 (https://tangled.org/oppi.li/stinkpot/branches)0 (https://tangled.org/oppi.li/stinkpot/tags)### 克隆此仓库 使用永久链接 HTTPS https://tangled\.org/oppi\.li/stinkpothttps://tangled\.org/did:plc:wqstj3k5tslmm246baaf3tpa SSH git@tangled\.org:oppi\.li/stinkpotgit@tangled\.org:did:plc:wqstj3k5tslmm246baaf3tpa 对于自托管的节点,克隆 URL 可能因设置而异。 下载 tar\.gz (https://tangled.org/oppi.li/stinkpot/archive/main?format=tar.gz)下载 \.zip (https://tangled.org/oppi.li/stinkpot/archive/main?format=zip) 提交记录4 (https://tangled.org/oppi.li/stinkpot/commits/main) Signed\-off\-by: oppiliappan Signed\-off\-by: oppiliappan 加速反向搜索,SQLite 计划现在使用覆盖索引而非临时 B 树进行排序 Signed\-off\-by: oppiliappan readme\.txt `` stinkpot -------- _ _ / \ _ (_\/\_/\/_) /\/ \/\ \/\_/\/ \/_\/ " " stinkpot is an sqlite backed shell-history searcher for bash. stinkpot is a much tinier atuin (https://atuin.sh). i have been using atuin for a while, but i don't use most of its features: the sync server, atuin AI, dotfiles manager, script manager or the KV store. while sync is interesting, my machines have very different setups and i tend to run very different commands on them. my only usecase for atuin was the session agnostic history management, and the searcher TUI. stinkpot provides these while being about 400 lines of go. stinkpot is a tiny turtle species apparently, hence the name. develop ------- to build: go build -o stinkpot . usage ----- if you use home-manager for nixos, stinkpot has a home-manager module: home-manager.users. = { imports = [ ./home.nix inputs.stinkpot.homeManagerModules.default ]; }; if not, just call eval the init script in your .bashrc: eval "$(stinkpot init)" start by importing your existing bash history into stinkpot: stinkpot import and then hit ctrl+r at your shell to trigger reverse search: > search history... 1s vim flake.nix 3m redis-server 3m jj l 35m jj show m 36m jj git fetch 39m cd 40m vim readme.txt 788 matches · ↑/↓ move · enter accept · esc cancel hit tab/enter to accept the selection, hit enter again to execute. the history database is stored in ~/.local/share/stinkpot. if upgrades break the DB, just delete it and run the import command. ``
相似文章
SQLite压缩文本历史原型
Simon Willison试验将SQLite文本修订历史存储为压缩的JSON数组,比较了整体blob和分块存储方法。一项模拟1000次编辑的测试,使用Zstandard将20.4 MB的修订文本压缩为80.3 KB。
零依赖、超轻量级的 SQLite 数据库时光机
一款开源、零依赖的 SQLite 调试工具,能够跟踪数据库变更,并通过快照、Web UI 和 CLI 监控守护进程即时回退到任意先前状态。
Stash
Stash 是一款工具,为 Dock 中杂乱的应用程序提供一个隐藏口袋,帮助整理并减少视觉杂乱。
Git history 命令值得更多关注
文章重点介绍了新的 `git history` 命令及其 `fixup`、`reword` 和 `split` 子命令,这些命令提供了原子化且感知分支的提交历史编辑功能,带来了类似 jj 的益处,而无需切换版本控制系统。
用细齿梳检查 SQLite
John Regehr 描述了使用 tis-interpreter 在 SQLite 中搜索未定义行为,发现了其他工具遗漏的错误,如悬空指针使用和未初始化读取。