Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout to raw_bg read, avoid hang on certain platforms #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mitchcapper
Copy link

@mitchcapper mitchcapper commented Apr 23, 2023

First you are a crazy mad person with far too much love for bash;)

Second, this script works on linux (ubuntu) and windows (msys but native windows highlight.exe) but I ran into an issue.

grepp/grep+

Line 1001 in cfc8148

if IFS=';' read -r -d '\' raw_bg; then

this command that looks like its trying to read the background color from the terminal hangs on both platforms for me.

As I am not nearly as smart as you however, I can't figure out exactly how it should work to actually fix it. Instead here is a quick 1 second timeout to prevent the hang for those of us who don't have the slash incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant