Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Display full help with 'help' function#5195

Merged
adityapatwardhan merged 4 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
rkeithhill:rkeithhill/full-help-outputrkeithhill/PowerShell:rkeithhill/full-help-outputCopy head branch name to clipboard
Nov 6, 2017
Merged

Display full help with 'help' function#5195
adityapatwardhan merged 4 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
rkeithhill:rkeithhill/full-help-outputrkeithhill/PowerShell:rkeithhill/full-help-outputCopy head branch name to clipboard

Conversation

@rkeithhill

Copy link
Copy Markdown
Collaborator

Display full help on Windows systems where user has overriden pager with $env:PAGER.

Fix #4962

@rkeithhill

Copy link
Copy Markdown
Collaborator Author

Any chance of something like this making it in before 6.0.0 final? It would be nice to offer full help to Linux users. And to Windows users who elect to set $env:PAGER to a better pager app. :-)

@adityapatwardhan

Copy link
Copy Markdown
Member

@rkeithhill Sorry for the delay. I will review this today.

@rkeithhill

Copy link
Copy Markdown
Collaborator Author

No problem. You all had a big push to get beta.9 out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test which check the view that gets selected. It should have #FullView

(Get-Help Get-Command -Full).psobject.typenames

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can add that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, to be clear, this tweak affects only the help function on Linux/macOS/Windows as well as the man alias on Windows. That function pipes through a pager so we don't get rich objects out - just text. That is why I'm using -cmatch to look for certain words that indicate it is full help.

Display full help on Windows systems where user has overriden pager with $env:PAGER.

Fix PowerShell#4962
@rkeithhill rkeithhill force-pushed the rkeithhill/full-help-output branch from c18eb53 to 1eb85f2 Compare October 27, 2017 05:07
@vors vors removed their request for review October 28, 2017 06:03
}
}

It "help should not return full view without -Full switch" -Skip:(!$IsWindows) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you already have and after all the Skip should be done over there instead of repeating it in every It.

https://github.com/PowerShell/PowerShell/blob/master/docs/testing-guidelines/WritingPesterTests.md#skipping-tests-in-bulk

}
}

It "help should return full view without -Full switch" -Skip:(!$IsWindows) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@adityapatwardhan adityapatwardhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rkeithhill

Copy link
Copy Markdown
Collaborator Author

I think this is ready to go. The feedback from the @PowerShell/powershell-committee review was implemented in the last commit.

@adityapatwardhan adityapatwardhan changed the title Display full help on non-Windows systems Display full help with 'help' function Nov 6, 2017
@adityapatwardhan adityapatwardhan merged commit c781959 into PowerShell:master Nov 6, 2017
@rkeithhill rkeithhill deleted the rkeithhill/full-help-output branch May 29, 2019 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.