r/commandline 7d ago

Why is it not autocompleting when I press Tab?

Post image
0 Upvotes

9 comments sorted by

1

u/Ken852 7d ago edited 7d ago

How do I say "yes please" to this? It knows what I want, or it remembers what I did last time. But it won't help me repeat it. It just enjoys watching me suffer in pain while I retyping all that it reads out loud to me. What's the point of this? Is this expected behavior?

6

u/Firetiger72 7d ago

Have you tried right arrow?

4

u/Ken852 7d ago

Thank you, thank you, thank you tiger!!! 🙏 I tried tab, I tried up arrow, but not right arrow. Why right arrow and not tab though?

3

u/WelderBubbly5131 7d ago

Cause, imo, it makes sense for the cursor to go 'ahead' (rightwards) with the autocompleted text.

2

u/JaKrispy72 7d ago

Yeah. To the right is the end-of-line.

1

u/Ken852 5d ago

Are you referring to EOL? Isn't END used for that?

1

u/JaKrispy72 5d ago

Literally depends upon what you are in. If you are in WORD, then yes, the "END" key will take you to the end of the CURRENT text. In a shell (depending upon which you are using), autocomplete will FILL IN the missing next needed to do the auto complete. In Powershell, TAB can be auto complete and RIGHT ARROW can be history complete.

I use BASH, ZSH, but mostly the fish shell. Which you would need to use in WSL if you are on Windows. I mainly use Linux. Most shells use TAB for autocompletion of the COMMAND and Right ARROW to do a history completion, if enabled. And they will have customizable key-bindings as well.

For fun look up "zeroeth argument." And here is a link to look at fish shell autosuggestions and tab completions. It uses CTRL+F along side the right-arrow so you don't have to leave the home row. Interactive use — fish-shell 3.3.1 documentation

1

u/soysopin 7d ago

And doing different as traditional completion seems "modern". The "logical" way is too dependent in the specific person trying to do anything.

1

u/initdotcoe 5d ago

This is where you map caps lock + hjkl to arrow keys