feat: reuse format options logic for stdin#36
Conversation
This is a first attempt at re-using the format options logic when stdin mode has been given a file path. There is still code clean up to do, but this should roughly work.
|
I think we shouldn't have utility functions in |
|
yep I agree. I planned on moving them out before publishing this pr, so will do that once I'm back from London this week 👍 |
|
Worth considering trying to not have them in the first place if possible, this change seems kinda big and kinda disruptive 🤔 |
|
how else can you do it? the logic in there right now is very intertwined. lots of logic crossing paths, making it difficult to extract without repeating some things you'd rather duplicate all of it into the stdin function? 🤔 |
|
Maybe there isn't a less disruptive way, I'm not sure what the solution is exactly 🤔 I think I'd want to explore how to map the stdin with ~filepath code path into the globs code path, like maybe processing stdin with ~filepath in some way is kinda like searching with a very specific glob, and making sure a result is "found" for it even if not in the filesystem, and maybe bypassing the cache, and a couple very minor tweaks like that? 🤔 I think we should explore doing it that way if possible at all, to not majorly change the code. |
0c953fb to
ada6549
Compare
34e0257 to
f8dc396
Compare
This is a first attempt at re-using the format options logic when stdin mode has been given a file path.
There is still code clean up to do, but this should roughly work.