cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.85k stars 178 forks source link

bash: syntax error near unexpected token `newline' in Ubuntu 20.04 #148

Closed goddade closed 3 years ago

goddade commented 3 years ago

GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

After the update, when I press Ctrl+r, it prompts "bash: syntax error near unexpected token `newline'".

I think there is a problem with bind -x '"\C-r": "echo \#mcfly: ${READLINE_LINE[@]} >> "$MCFLY_HISTORY" ; READLINE_LINE= ; mcfly search"'.

bind "'\C-r': '\e0i#mcfly: \e\C-m mcfly search\C-m'" works well.

cantino commented 3 years ago

Thank you @goddade, I just confirmed this bug. I believe this is a regression from e85dcfe46de6eeac93bcaff8f7395a1eba4b8b9c. Fixed in 87cf5cf115034f537bfde459fd674b1dede28822. Would you mind checking if master is working for you now?

(If so, I'll push out a release.)

goddade commented 3 years ago

@cantino It works, Thank you.