How can I easily paste suggested commands in PowerShell 7?

0
17
Asked By TechieTiger94 On

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

Answered By KeyboardNinja62 On

The right arrow key works for me to complete those suggestions. I get that it's not the most intuitive, though!

PixelPioneer88 -

Same here, I wish it was just the tab key! That would make things easier.

CodeCrafter33 -

Yeah, but isn't it tricky? How does PowerShell know if you want to complete the suggested command or start a new one?

Answered By CommandGuru21 On

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.

Answered By SimpleCoder99 On

Hitting tab should also work to complete, but sometimes it can be finicky depending on what you've typed.

Answered By MysteryUser007 On

Actually, I think it's the right arrow you need to use. Pretty unintuitive if you ask me.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.