Hey everyone! I'm using PowerShell 7, and I noticed that when I start typing a command I've run before, it suggests that command in grey text. For instance, if I type 'Get', it shows a command like 'Get-Module -ListAvailable PnP.PowerShell | Format-Table Name, Version' in grey. I've tried pressing the tab key, arrow keys, and a bunch of other buttons, but nothing seems to paste or complete the command for me. Is there a straightforward way to do this?
4 Answers
The right arrow key works for me to complete those suggestions. I get that it's not the most intuitive, though!
Yeah, but isn't it tricky? How does PowerShell know if you want to complete the suggested command or start a new one?
Just hit the tab key! It should work for completing commands, but if it doesn't, try remapping your key bindings for prediction. It's definitely a bit confusing at first.
Hitting tab should also work to complete, but sometimes it can be finicky depending on what you've typed.
Actually, I think it's the right arrow you need to use. Pretty unintuitive if you ask me.
Same here, I wish it was just the tab key! That would make things easier.