beamtea_filepicker (beamtea v0.1.0)
View SourceA bubble: a filesystem picker, mirroring the filepicker package in charmbracelet/bubbles.
Browse directories with the arrows, descend with Enter/→, ascend with ←/Backspace. Selecting a file records it; read it back with did_select_file/1.
Summary
Functions
The path of a file the user selected, or none.
The {Name, IsDir} currently under the cursor, or none.
Options: path (starting directory, default cwd), height (visible rows, default 12), colours.
Navigate in response to a key.
Render the current path and the visible window of entries.
Types
Functions
-spec did_select_file(model()) -> none | file:filename().
The path of a file the user selected, or none.
The {Name, IsDir} currently under the cursor, or none.
-spec new() -> model().
Equivalent to new(#{}).
Options: path (starting directory, default cwd), height (visible rows, default 12), colours.
-spec path(model()) -> file:filename().
-spec update(term(), model()) -> {model(), beamtea:cmd()}.
Navigate in response to a key.
Render the current path and the visible window of entries.