beamtea_filepicker (beamtea v0.1.2)
View SourceA bubble: a filesystem picker, mirroring the filepicker package in charmbracelet/bubbles.
Browse directories with the arrows, descend with Enter/→, ascend with ←/Backspace. Each row shows a Unix-style permissions column, a size column and the name — directories in purple, files in gray. 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), dir_color (default purple), file_color (default gray), select_color.
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), dir_color (default purple), file_color (default gray), select_color.
-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.