Joshua already mentioned F7. You can also do partial history matches in Powershell.exe by typing some of the command and pressing F8 - repeat F8 to cycle through matches (see about_history). There are also a few more line editing features than folks typically know about. These are documented in the about_line_editing help topic. Still, line editing in the PowerShell console host leaves something to be desired. FWIW all of the other hosts I'm aware of are GUI based.
BTW I was a 4NT user for years (as well as Korn shell user). Even with a few missing amenities found in 4NT, I find PowerShell a much more capable shell and, as a developer, all the "language" bits are pretty easy to adapt to and use. I never really liked the Korn shell if / fi
and case / esac
statements - just rubbed my sense of aethestics the wrong way. :-) Plus in PowerShell you can do cool stuff with your history like:
# Search history using regex
PS> get-history -count 999 | select-string '\b(fl|ft)\b'
# Look at your shell usage pattern by hour of day - Name column is hour of day
PS> ghy | group {$_.StartExecutionTime.Hour}
Count Name Group
----- ---- -----
30 21 {$allargs, echoargs -arg $allArgs, echoargs $a
2 22 {ghy | group {$_.StartExecutionTime.Hour}, ls}
# Look at commands in terms of execution time (sorted descending)
PS> ghy | Select CommandLine,Id,`
@{n='ExecutionTime';e={$_.EndExecutionTime - $_.StartExecutionTime}} |
Sort ExecutionTime -Desc
CommandLine Id ExecutionTime
----------- -- -------------
ls C:\Windows\System32 ... 94 00:00:06.0233445
ls C:\Windows\System32\... 93 00:00:01.1360650
gps | fl 89 00:00:00.5780330
dir 80 00:00:00.0950054
ls 83 00:00:00.0870050
ghy | Select CommandLin... 92 00:00:00.0810046
dir 67 00:00:00.0750042
ghy | Select CommandLin... 95 00:00:00.0580034
ghy | Select CommandLin... 96 00:00:00.0570032
ghy | Select CommandLin... 97 00:00:00.0540031
dir 76 00:00:00.0500029
get-history -count 999 ... 88 00:00:00.0420024