out-of-cheese-error / the-way

A code snippets manager for your terminal.
MIT License
352 stars 16 forks source link

Windows support #114

Open God-damnit-all opened 2 years ago

God-damnit-all commented 2 years ago

Considering there appears to be PowerShell support (I know it's cross-platform now, but still) I'm surprised there's no Windows binaries available. Could you please add support for Windows?

Ninjani commented 2 years ago

This is blocked on skim Windows support. The alternative is call out to fzf just for Windows, I'd need some time to look into this - the search with custom keyboard shortcuts is a pretty significant part of the-way and replicating all that with fzf commands may not even be possible.

God-damnit-all commented 2 years ago

This is blocked on skim Windows support. The alternative is call out to fzf just for Windows, I'd need some time to look into this - the search with custom keyboard shortcuts is a pretty significant part of the-way and replicating all that with fzf commands may not even be possible.

I see. I noticed this reply in what you linked, it seems like it would be more directly useful than looking at fzf, which is based on Go rather than Rust:

heatseeker (another fuzzy filter written in Rust) uses the Windows API to write to the console. This should be a good starting point to understand how to do it or how to use termwiz.

Ninjani commented 2 years ago

Hmm heatseeker doesn't seem to have a preview window (the window that displays the code of each snippet) nor custom keyboard shortcuts afaict.

StaticPH commented 1 year ago

It doesn't provide a preview window, but https://crates.io/crates/fuzzy_finder relies on the same fuzzy-matcher crate as skim, and it seems to be just as capable of the fuzzy matching, if https://crates.io/crates/lk is anything to go by. So that could be a partial alternative.

For file previewing, both https://crates.io/crates/broot and https://crates.io/crates/felix appear to provide that functionality without depending upon skim. I also get the impression that https://crates.io/crates/crokey, used by broot, can be used to allow setting custom keyboard shortcuts by loading from a config file at runtime.