rlivings39 / vscode-fzf-quick-open

vscode extension providing quick file/folder open and searching using fzf
MIT License
77 stars 17 forks source link

`cut` on MacOS is not gnu coreutils #17

Closed srfraser closed 4 years ago

srfraser commented 4 years ago

cut on MacOS X is rather more limited than gnu cut, and so cut -z is invalid, producing cut: illegal option -- z

If gcut is installed through brew install coreutils then that works as expected, and either OS detection in the extension or a configuration option for the name of the cut binary could be used. Inserting | tr '\n' '\0' to nul-terminate the string instead also works.

I'm happy to put a PR in, once I've heard if there's a strong preference one way or the other.

rlivings39 commented 4 years ago

Gotcha. @ndevvy also hit this.

Could you please give my v0.3.0 beta a shot: https://github.com/rlivings39/vscode-fzf-quick-open/releases In basic mac testing rg and open file work on mac. Add workspace folder is broken because find --type f doesn't work #18

I've reworked things to avoid xargs and cut by passing the fzf output to a pipe that the typescript code is listening on. Then I can do the parsing/text processing in typescript and don't need to rely on as many command line utilities. That should make things more portable and allow for more flexible processing in the future.

srfraser commented 4 years ago

That's working for me with 0.3.0, thank you!

rlivings39 commented 4 years ago

Thanks for checking and reporting this! I'll work on getting that realease with a few other fixes.