charmbracelet / charmbracelet/bubbles

filepicker: Allow for different filesystems to be used

Open
#815 3 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**
I would love to be able to utilize the filepicker bubble with a spoofed or mocked filesystem. If I wanted to create a program that has different isolated exercises/levels/puzzles/etc and still utilize the filepicker bubble, there would be no way to handle this without writing the files to disk. Especially in the situation of a puzzle, where you might not want the user to be able to access the files with their full CLI tools in another window

**Describe the solution you'd like**
I'd like for the model to take in some sort of filesystem interface that defaults to the OS filesystem but would allow something else (like afero's mock implementation, for example)

**Describe alternatives you've considered**
Using a list or lipgloss tree to kinda handroll the basic filepicker implementation, but with a mock filesystem

Contributor guide

Open the contributing guide

Research direction

Start at the filepicker bubble implementation and trace how it accesses the operating-system filesystem; no specific files or tests are named in the issue. Compare the current access points with afero's mock filesystem approach. Done means the filepicker accepts a filesystem abstraction, defaults to the OS filesystem, and supports an isolated or mocked implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.