Powershell command line history expansion

Viewed 141

I would like to have in Powershell something similar I had in a Fish shell. With every new keystroke e.g. Tab I would like to expand/select one part of some old command., please see the picture I attached. enter image description here

Get-ChildItem -Directory | ForEach-Object { Write-Host $_.FullName (Get-ChildItem $_ | Measure-Object).Count}

e.g

  • when I press the tab key the first time -> '-directory' will be selected
  • when I press the tab key a second time -> 'I' will be selected
  • when I press the tab key a third time -> 'ForEeach-Object' will be selected

etc.

1 Answers
Related