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

Bug with Ctrl+Z after Vim (bash) #40

Open
tuanpham96 opened this issue Jul 8, 2021 · 4 comments
Open

Bug with Ctrl+Z after Vim (bash) #40

tuanpham96 opened this issue Jul 8, 2021 · 4 comments

Comments

@tuanpham96
Copy link

I've been running into this issue with Ctrl+Z lately in bash.

  • Enter vim like vi ~/.bashrc
  • Press Ctrl+Z to put in background mode
  • Now type anything like ls
  • Issues: no typing of the command is visible but the output of the command is

This happens if I have source ~/.fzf/plugin/fzf-bash-completion.sh ; bind -x '"\t": fzf_bash_completion' in my .bashrc.

@TuM0xA-S
Copy link

TuM0xA-S commented Aug 3, 2021

same problem
demo: https://asciinema.org/a/ShSPut9OF6FxEAWK77i1XRpmt
here is also one way to reproduce:
Ctrl-C, then TAB
https://asciinema.org/a/xNupP5gOcC39OCCuJ6tc2wWXp

@TuM0xA-S
Copy link

TuM0xA-S commented Aug 3, 2021

btw you can type stty sane and you back to normal

@tuanpham96
Copy link
Author

thanks @TuM0xA-S!

following that, for troubleshooting if anyone is interested, here's the diff between the default (start of shell, stty-def.txt) after doing the Ctrl+Z thingy (stty-bug.txt) and after doing stty sane command (stty-aftersane.txt). I'm still reading through what these different settings are but the noticeable ones are [-]echo, lnext and discard that got changed.

image

image

image

@TuM0xA-S
Copy link

TuM0xA-S commented Aug 5, 2021

i found workaround:
just place it PROMPT_COMMAND="stty $(stty -g)" in you bashrc.
it just resets terminal to its initial state before printing prompt

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