Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using a pipe to restrict the output of
skim -f <somestring>
results in an error:The error is innocuous, yet should probably be addressed in a future commit. Ideally,
skim
should terminate once it encounters aBroken Pipe
error internally.ripgrep
has gone through this same feature progression, as documented by these links:BurntSushi/ripgrep#200
https://github.com/BurntSushi/ripgrep/pull/586/files
In that discussion, there is a hacky fix to terminate the program once it encounters a
SIGPIPE
error. This fix is what I have included in this PR.Like @BurntSushi laments, this error should be handled naturally within the program. I'm not too comfortable with Rust so I wasn't able to understand how he handles in
ripgrep
, but in case anyone wants to understand it, the commit that makes this feature possible is at https://github.com/BurntSushi/ripgrep/pull/1017/files#diff-639fbc4ef05b315af92b4d836c31b023I've tested this hotfix on my local machine and it seems to terminate as expected. Speed wise, I am not seeing any difference.