[Ubuntu18.04] Unable to execute the command if searched using "reverse-i-search" #8393

Closed
opened 2026-01-31 01:28:15 +00:00 by claunia · 6 comments
Owner

Originally created by @prayagsingh on GitHub (May 21, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.264]
Windows Terminal version (if applicable): 1.0.1401.0

Steps to reproduce

  1. press ctrl R in Ubuntu 18.04 terminal(windows-terminal) to search the command and press Tab key to complete the command.
    eg: In my case, i was searching for docker-compose -f docker-compose.yaml up -d command

Expected behavior

If pressed Tab key to complete the command in reverse-i-search then it shouldn't freeze the cursor in the beginning of the command.

Actual behavior

  1. I'm trying to run the command using reverse-i-search (ctrl R). Search is working fine but if I'm using Tab key while searching to complete the command in reverse-i-search then the cursor freezes in the beginning of the command and when I'm trying to execute it by pressing enter key then it is not happening. It stuck.
  2. Even ctrl C is not working. Only way to get out of this is to close the terminal.
Originally created by @prayagsingh on GitHub (May 21, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.264] Windows Terminal version (if applicable): 1.0.1401.0 ``` # Steps to reproduce 1. press ctrl R in Ubuntu 18.04 terminal(windows-terminal) to search the command and press Tab key to complete the command. eg: In my case, i was searching for docker-compose -f docker-compose.yaml up -d command # Expected behavior If pressed `Tab` key to complete the command in `reverse-i-search` then it shouldn't freeze the cursor in the beginning of the command. # Actual behavior 1. I'm trying to run the command using `reverse-i-search (ctrl R)`. Search is working fine but if I'm using `Tab` key while searching to complete the command in `reverse-i-search` then the cursor freezes in the beginning of the command and when I'm trying to `execute` it by pressing `enter key` then it is not happening. It stuck. 2. Even `ctrl C` is not working. Only way to get out of this is to close the terminal.
Author
Owner

@zadjii-msft commented on GitHub (May 28, 2020):

Huh, that's certainly weird. It sounds like the focus got out of the Terminal and into some other UI element. Does clicking on the Terminal, in the text area restore focus to terminal (allowing input again)?

@zadjii-msft commented on GitHub (May 28, 2020): Huh, that's certainly weird. It sounds like the focus got out of the Terminal and into some other UI element. Does clicking on the Terminal, in the text area restore focus to terminal (allowing input again)?
Author
Owner

@prayagsingh commented on GitHub (May 31, 2020):

No. It stop responding. I'm facing this issue from last couple of months. Earlier I reported this bug in WSL project(thought that this is a wsl issue)

For reference, I have attached the screenshot when I reported it in WSL project.
https://github.com/microsoft/WSL/issues/4966

Still same issue.

@prayagsingh commented on GitHub (May 31, 2020): No. It stop responding. I'm facing this issue from last couple of months. Earlier I reported this bug in WSL project(thought that this is a wsl issue) For reference, I have attached the screenshot when I reported it in WSL project. https://github.com/microsoft/WSL/issues/4966 Still same issue.
Author
Owner

@onomatopellan commented on GitHub (Jun 7, 2020):

Same issue. In my case the bash shell hangs because it's scanning every file available in PATH, specially in /mnt/ directories. See https://github.com/microsoft/WSL/issues/4966#issuecomment-640135458

Easiest way to reproduce: From bash type unshare and press TAB two or tree times. The cursor blinks but you can't type. Just wait for some seconds until is responsive again.

@onomatopellan commented on GitHub (Jun 7, 2020): Same issue. In my case the bash shell hangs because it's scanning every file available in PATH, specially in /mnt/ directories. See https://github.com/microsoft/WSL/issues/4966#issuecomment-640135458 Easiest way to reproduce: From bash type `unshare` and press TAB two or tree times. The cursor blinks but you can't type. Just wait for some seconds until is responsive again.
Author
Owner

@zadjii-msft commented on GitHub (Jun 16, 2020):

Sorry for the delay, we've had a bit of a busy month and are just catching up on triage.

@prayagsingh does @onomatopellan's fix from microsoft/WSL#4966 help?

To test if that's the problem, from bash run this:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

and after that try again using reverse-i-search. Now there shouldn't be any hangs.

@zadjii-msft commented on GitHub (Jun 16, 2020): Sorry for the delay, we've had a bit of a busy month and are just catching up on triage. @prayagsingh does @onomatopellan's fix from microsoft/WSL#4966 help? > To test if that's the problem, from bash run this: > > ``` > export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games > ``` > > and after that try again using reverse-i-search. Now there shouldn't be any hangs.
Author
Owner

@prayagsingh commented on GitHub (Jun 16, 2020):

@zadjii-msft yes it works but commands like code . and explorer.exe . stopped working because the Path isn't present.

alpha@GHOST-RIDER:/c/Users/GHOST-RIDER$ code .

Command 'code' not found, did you mean:

  command 'cde' from deb cde
  command 'ode' from deb plotutils
  command 'tcode' from deb emboss
  command 'node' from deb nodejs
  command 'cobe' from deb python-cobe
  command 'cdde' from deb cdde

Try: sudo apt install <deb name>

alpha@GHOST-RIDER:/c/Users/GHOST-RIDER$ explorer.exe .
explorer.exe: command not found

Below is the list of Path's assigned before applying @onomatopellan fix.

/home/alpha/.local/bin:/home/alpha/GoWorkspace/src/github.com/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/c/Program Files (x86)/NetSarang/Xshell 6/:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Program Files (x86)/Intel/iCLS Client/:/c/Program Files/Intel/iCLS Client/:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Users/GHOST-RIDER/AppData/Local/Programs/Python/Python36-32/:/c/Users/GHOST-RIDER/AppData/Local/Programs/Python/Python36-32/Scripts/:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/c/WINDOWS/System32/OpenSSH/:/c/Android:/d/BlockChain/IPFS/go-ipfs_v0.4.17_windows-amd64/go-ipfs:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Git/bin:/c/MinGW/bin:/c/Program Files/MongoDB/Server/4.0/bin:/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/c/Go/bin:/c/Program Files/PuTTY/:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files/nodejs/:/c/Program Files/Microsoft VS Code/bin:/c/Program Files/Docker/Docker/resources/bin:/c/ProgramData/DockerDesktop/version-bin:/c/Program Files/MySQL/MySQL Shell 8.0/bin/:/c/Users/GHOST-RIDER/go/bin:/c/Users/GHOST-RIDER/AppData/Local/GitHubDesktop/bin:/c/Users/GHOST-RIDER/AppData/Local/Microsoft/WindowsApps:/c/Users/GHOST-RIDER/AppData/Roaming/npm:/d/Installation/IntelliJ IDEA 2019.3.3/bin:/c/Users/GHOST-RIDER/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin:/snap/bin:/home/alpha/GoWorkspace:/usr/local/go:/home/alpha/GoWorkspace/bin:/home/alpha/GoWorkspace/bin:/usr/local/go/bin
``
@prayagsingh commented on GitHub (Jun 16, 2020): @zadjii-msft yes it works but commands like `code .` and `explorer.exe .` stopped working because the `Path` isn't present. ``` alpha@GHOST-RIDER:/c/Users/GHOST-RIDER$ code . Command 'code' not found, did you mean: command 'cde' from deb cde command 'ode' from deb plotutils command 'tcode' from deb emboss command 'node' from deb nodejs command 'cobe' from deb python-cobe command 'cdde' from deb cdde Try: sudo apt install <deb name> alpha@GHOST-RIDER:/c/Users/GHOST-RIDER$ explorer.exe . explorer.exe: command not found ``` Below is the list of Path's assigned before applying @onomatopellan fix. ``` /home/alpha/.local/bin:/home/alpha/GoWorkspace/src/github.com/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/c/Program Files (x86)/NetSarang/Xshell 6/:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Program Files (x86)/Intel/iCLS Client/:/c/Program Files/Intel/iCLS Client/:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Users/GHOST-RIDER/AppData/Local/Programs/Python/Python36-32/:/c/Users/GHOST-RIDER/AppData/Local/Programs/Python/Python36-32/Scripts/:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/c/WINDOWS/System32/OpenSSH/:/c/Android:/d/BlockChain/IPFS/go-ipfs_v0.4.17_windows-amd64/go-ipfs:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Git/bin:/c/MinGW/bin:/c/Program Files/MongoDB/Server/4.0/bin:/c/Program Files (x86)/HP/Common/HPDestPlgIn/:/c/Go/bin:/c/Program Files/PuTTY/:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files/nodejs/:/c/Program Files/Microsoft VS Code/bin:/c/Program Files/Docker/Docker/resources/bin:/c/ProgramData/DockerDesktop/version-bin:/c/Program Files/MySQL/MySQL Shell 8.0/bin/:/c/Users/GHOST-RIDER/go/bin:/c/Users/GHOST-RIDER/AppData/Local/GitHubDesktop/bin:/c/Users/GHOST-RIDER/AppData/Local/Microsoft/WindowsApps:/c/Users/GHOST-RIDER/AppData/Roaming/npm:/d/Installation/IntelliJ IDEA 2019.3.3/bin:/c/Users/GHOST-RIDER/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin:/snap/bin:/home/alpha/GoWorkspace:/usr/local/go:/home/alpha/GoWorkspace/bin:/home/alpha/GoWorkspace/bin:/usr/local/go/bin ``
Author
Owner

@zadjii-msft commented on GitHub (Jun 16, 2020):

Okay well that's good to know. If that's the case, then this definitely isn't a Terminal issue, but something more fundamental to WSL. This will probably be better served by continuing the discussion in microsoft/WSL#4966. Thanks!

@zadjii-msft commented on GitHub (Jun 16, 2020): Okay well that's good to know. If that's the case, then this definitely isn't a _Terminal_ issue, but something more fundamental to WSL. This will probably be better served by continuing the discussion in microsoft/WSL#4966. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8393