sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
264 stars 10 forks source link

Support using the minibuffer via fsys #24

Closed sminez closed 1 month ago

sminez commented 1 month ago

Please describe the change / addition you'd like to see made

It should be possible to use the minibuffer via the filesystem interface. Newline delimited options should be passed to the minibuffer through a control file and then reading that control file should block until a selection is made before returning it. The last selection should remain in state as a sticky result for repeated reading, being cleared when a new set of options are sent to the control file.

cat my_options.txt >> ~/.ad/mnt/minibuffer
read1="$(cat ~/.ad/mnt/minibuffer)"  # blocks until a selection is made
read2="$(cat ~/.ad/mnt/minibuffer)"  # returns the same selection immediately

Is this a feature you have seen in other text editors?

Not in other text editors but the behaviour should be similar to using dmenu