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

bash: read: read error: 0: Invalid argument #42

Closed
richard-scott opened this issue May 10, 2017 · 2 comments
Closed

bash: read: read error: 0: Invalid argument #42

richard-scott opened this issue May 10, 2017 · 2 comments

Comments

@richard-scott
Copy link

Hi,

Every now and then I get the following issue after pressing return on entering a new command:

bash: read: read error: 0: Invalid argument

I'm guessing that this bit of code is causing the issue:

__bp_in_prompt_command() {

    local prompt_command_array
    IFS=';' read -ra prompt_command_array <<< "$PROMPT_COMMAND"

I have changed the read part to be this:

    IFS=';' read -ra prompt_command_array 2>/dev/null <<< "$PROMPT_COMMAND"

and that seems to have squished the message for now. I'll keep an eye on things to see how it goes.

Thanks,

Rich

@rcaloras
Copy link
Owner

@richard-scott would love a PR if you think this solves the issue. Feel free to open!

@rcaloras
Copy link
Owner

rcaloras commented Sep 6, 2017

Closing this due to inactivity. @richard-scott feel free to reopen if you think this is still an issue.

@rcaloras rcaloras closed this as completed Sep 6, 2017
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

No branches or pull requests

2 participants