Description of the new feature/enhancement
Consider the case that only these sub-directories are in the current directory:
- 📂
directory_barbarbarbarbarbarbarbarbarbar
- 📂
directory_foofoofoofoofoofoofoofoofoofoo
- 📂
directory_foofoofoofoofoofoofoofoofoofoo_001
- 📂
directory_foofoofoofoofoofoofoofoofoofoo_002
- ︙
- 📂
directory_foofoofoofoofoofoofoofoofoofoo_100
- 📂
directory_quxquxquxquxquxquxquxquxquxqux
If you want to enter the directory_quxquxquxquxquxquxquxquxquxqux by cd, the current behavior of PSReadLine is:
1️⃣
↓ Tab
2️⃣
PS> cd␣.\directory_barbarbarbarbarbarbarbarbarbar
\AHHHHH!!! IT'S A PAIN OF AΣΣ TO DELETE THE SOOOO LONG SUFFIX!!!/
↓ Tab
2️'
PS> cd␣.\directory_foofoofoofoofoofoofoofoofoofoo
↓ Tab
2️''
PS> cd␣.\directory_foofoofoofoofoofoofoofoofoofoo_001
\HOW MANY TIMES DO I HAVE TO PRESS TAB!?!?/
The current behavior is not suitable for this situation.
Proposed technical implementation details (optional)
The first Tab should complete only the common prefix like (the new state 1️⃣' is added):
1️⃣
↓ Tab
1️⃣'
↓ Tab
2️⃣
PS> cd␣.\directory_barbarbarbarbarbarbarbarbarbar
↓ Tab
2️'
PS> cd␣.\directory_foofoofoofoofoofoofoofoofoofoo
If you want to enter directory_quxquxquxquxquxquxquxquxquxqux, you just have to press q then Tab when 1️⃣'.
FYI: Bash's behavior:
- Completes only the common prefix (1️⃣')
- Shows candidates
- Shows candidates
- ︙
The behavior of Fish and Zsh:
- Complete only the common prefix (1️⃣')
- Shows candidates
- Choose the 1st candidate (2️⃣)
- Choose the 2nd one (2️⃣')
- ︙
Description of the new feature/enhancement
Consider the case that only these sub-directories are in the current directory:
directory_barbarbarbarbarbarbarbarbarbardirectory_foofoofoofoofoofoofoofoofoofoodirectory_foofoofoofoofoofoofoofoofoofoo_001directory_foofoofoofoofoofoofoofoofoofoo_002directory_foofoofoofoofoofoofoofoofoofoo_100directory_quxquxquxquxquxquxquxquxquxquxIf you want to enter the
directory_quxquxquxquxquxquxquxquxquxquxbycd, the current behavior of PSReadLine is:1️⃣
↓
Tab2️⃣
\AHHHHH!!! IT'S A PAIN OF AΣΣ TO DELETE THE SOOOO LONG SUFFIX!!!/
↓
Tab2️'
↓
Tab2️''
\HOW MANY TIMES DO I HAVE TO PRESS TAB!?!?/
The current behavior is not suitable for this situation.
Proposed technical implementation details (optional)
The first
Tabshould complete only the common prefix like (the new state 1️⃣' is added):1️⃣
↓
Tab1️⃣'
↓
Tab2️⃣
↓
Tab2️'
If you want to enter
directory_quxquxquxquxquxquxquxquxquxqux, you just have to pressqthenTabwhen 1️⃣'.FYI: Bash's behavior:
The behavior of Fish and Zsh: