Make fzt's picker a package a running program can serve (picker.Main) #174
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-verification
question
queue
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/fzt-terminal!174
Loading…
Reference in a new issue
No description provided.
Delete branch "picker-package"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This moves fzt's command-line picker into an importable package. Then fzt-automate, which now stays running for tmux, can run scripts' pickers too, and fzt.exe can go once nothing else calls it.
Moved: fzt.exe's flags, row building (
stdinItems,linkTree, columns,isDir),--filter, the pick output and the failure logging move fromcmd/fzt/main.gotopicker/aspicker.Main(args, picker.IO). It returns fzf's exit codes.IOcarries the rows, the pick, the errors, an optional unstarted screen (drawn withtui.RunOn), and the caller's folder, used to resolve a row's relative path to a folder icon and--yaml.Added:
tui.FilterTo(w, ...), which isRunFilterwriting tow;RunFilternow calls it with stdout.Kept in
cmd/fzt:--paneand--pane-io(pane.go, unchanged); the program then callspicker.Mainin its terminal. Behaviour is the same, and the existing failure-logging tests pass against the binary.Tests: the existing picker tests move with the code. New ones cover the picker drawing on a screen it is given, reading the caller's folder for a folder icon and writing its pick to its output;
--filterwriting to its output; and empty input exiting 1.Work package: https://openproject.home.romaine.life/wp/FZTA-25
🤖 Generated with Claude Code
merge-queue stopped this at
ad7b696: CI failed: Suite go / check-test-windows (pull_request). Push a fix. A failure fixed on main lands once thequeuelabel is removed and added again: the queue merges main in and CI runs on the new head.ad7b696dce38382232f6