Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4764,7 +4764,8 @@ internal static SessionStateAliasEntry[] BuiltInAliases

# Respect PAGER, use more on Windows, and use less on Linux
if (Test-Path env:PAGER) {
$moreCommand = (Get-Command -CommandType Application $env:PAGER | Select-Object -First 1).Definition
$pager,$moreArgs = $env:PAGER -split '\s+'
$moreCommand = (Get-Command -CommandType Application $pager | Select-Object -First 1).Definition
} elseif ($IsWindows) {
$moreCommand = (Get-Command -CommandType Application more | Select-Object -First 1).Definition
} else {
Expand All @@ -4773,9 +4774,9 @@ internal static SessionStateAliasEntry[] BuiltInAliases

if($paths) {
foreach ($file in $paths) {
Get-Content $file | & $moreCommand
Get-Content $file | & $moreCommand $moreArgs
}
} else { $input | & $moreCommand }
} else { $input | & $moreCommand $moreArgs }
";

internal const string DefaultSetDriveFunctionText = "Set-Location $MyInvocation.MyCommand.Name";
Expand Down