-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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: pressing tab to select entry in reverse-i-search freezes the terminal #14695
Comments
Are you using bash inside WSL, or via SSH or something? I don't believe that Tab is the canonical way to select a result from In WSL, tab completion definitely takes a while because WSL adds all of FWIW: I can reproduce similar behavior on Linux directly with a |
Oh, yep, sorry forgot to include WSL. Hmm... I'll do some more investigating about the tab completion. Interesting behavior then, on my Linux hardware it wasn't triggering tab completion, just selecting the command. I'll look into the versions of bash I suppose. |
qq: If you were to |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
Hi @DHowett I'm experiencing the same problem. Do you have the ability to reopen this issue? I ran I don't understand, though - Why would having a lot of items on your PATH affect Thanks! |
What is the normal way to select a result from EDIT: I think you're on to something, but I think it's a little more complicated than just triggering tab completion. The "recent command" I'm using to test this behavior is this:
If, instead of pressing tab after If I have
Any idea why there's only a significant delay when I press tab while the cursor is at the start of the line? |
Hey @JL102! Sorry to leave you on read for a couple days. So, what I believe is happening is that bash is scanning every directory in
(I don't know if
You know, I never thought about this! I always use the right arrow, which breaks out of bck-i-search and moves the cursor simultaneously. 🤷 |
@DHowett Thanks for the explanation! Really sucks that it does this, but your answer seems to make sense.
Hmm. The explanation makes sense for what's causing it to take so long, but I still don't get why Bash is (probably) triggering tab autocompletion when I exit |
I am still having this issue as of end of February 2024. The right arrow method works but it's a pain that this can't handle the autocomplete. |
Likewise. Hitting tab to select a |
FYI, I've been working around this by pressing |
I've been having the same problem in a WSL terminal, and just stumbled upon this issue which explains what is happening. I spontaneously used Tab to select the current result, I guess I should use the → right arrow or End from now on. |
This issue is still reproducing on Ubuntu WSL in Windows 11. The ticket ought to be reopened. |
@dwymark-celestron is the explanation above (copied here below) unsuitable?
The TL;DR is: Windows Terminal and the Windows Console Subsystem are not responsible for this behavior. Your shell is. |
Ever since I came across the same situation and after reading this thread, I started using the right arrow key instead of the Tab key. The Tab key seems more intuitive for an "autocomplete" feature. I believe that this issue, given the situation, is a "can't fix", and the solution is just to get used to using the right arrow (or the End key) rather than the Tab key. |
Windows Terminal version
1.15.3465.0
Windows build number
Version 10.0.19044.2364
Other Software
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Steps to reproduce
Control + Shift + R to enter reverse-i-search, type to bring up a command then press TAB to try to select it.
Expected Behavior
The command should be put at the prompt and the terminal should remain interactive.
Actual Behavior
The command does get placed at the prompt but the terminal becomes unresponsive. Control-C is the only input that registers to the screen, but it doesn't unfreeze the terminal. All other keypresses seem to have no effect, although the blinking cursor does pause blinking when other keys are pressed so it seems that they are registered to some degree.
The text was updated successfully, but these errors were encountered: