You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Before 6.0.0 ships can we make Get-Help -full the default? #4962
On Linux, the man pages display their full content by default. I believe PowerShell should do the same. The number of times I use get-help (or the alias man) without the -Full parameter can be counted on 1 hand (actually probably 0 hands). I've always disliked the switch that was made to seriously abbreviate PowerShell help topics. It was too dumbed down.
So here's a chance to do the right thing and make the default output the full output. I think that is what both Linux and macOS users would expect.
A "Did you look at the help for the examples on how to use that command",
B "Yes, I didn't see any."
A "Oh, didn't you use the -Full parameter on help?"
B "Huh? You mean the help command didn't show me all the help?"
A "Nope."
B "WTF?"
Reacted by Troy Campbell, Flavien MICHALECZEK, Trevor Sullivan, antiufo, Mark Kraus, Michael Klement and Sebastian N.
Even on Windows, I found that Get-Help without an additional Parameter was not very helpful most of the times. I would welcome it if showed e.g. at least one of the examples and maybe the OUTPUTS section. I agree with Ilya (@iSazonov) that it would be useful to have a prompt that says something like Show More? Y/N
For 6.1.0, we intend to revisit the whole helpsystem as well as rendering. For 6.0.0, we could default to showing full help if that is more useful for the majority of the time.
I would prefer the help system default to full help. I believe emitting full help on Linux and macOS is much less of an issue because these OSs have decent paging utilities (and those users know how to use those utilities).
BTW Windows SERIOUSLY needs a better paging utility than more.com which is like using stone knives and bear skins compared to using less. :-)
Ilya (@iSazonov) that's an option, however, if the majority of cases is that they answer 'y', it seems showing the full help when using help since it gets paged would also work
Defaulting to showing the full help contents would be best - especially on Windows. I'd prefer to have everything and scroll through rather than have it paged. Paging just makes things slower and adds negative value.
I never understood why the default was to show a cut down version when the most useful parts are the examples and the parameter descriptions when you're trying to understand how to use a cmdlet.
Paging just makes things slower and adds negative value.
RichardSiddaway That's because the pager on Windows sucks. When you use something like less you can scroll line-by-line or by pages and you can search for terms. Searching a help topic like this is very handy.
I know some folks don't like this next feature but when you do quit the pager (yeah, yeah pressing q is a bit weird) the helpt text is gone from the buffer so you can see your last command without having to scroll.
Besides, folks on Linux and macOS will expect help to be paged just like man on those platforms pages its output.
I'm not sure what the plans for paging in regards to the help system are, but I'm more of the opinion that Powershell in general could use some sort of Out-Pager.
Steve Lee (@SteveL-MSFT) and I just spoke on this in our @PowerShell/powershell-committee meeting (no quorum).
We agree wholeheartedly on a few points:
paging should be the default on Linux/Mac
-Full should be the default (especially given default paging)
in the fullness of time, we should do something like an Out-Pager (even if it's just a wrapper on the default pager, similar to the implementation in Get-Command help | Format-List Definition)
We're a little less sure on:
Whether Windows should also page by default. I'm torn: the help function pages by default, and people are always confused there, but more.com is also really...not good.
Whether we should make the help function an alias, and have Get-Help and help do the same thing (whether that's paging or not paging).
I'm a bit less concerned about Get-Help on Windows. Personally I'd prefer-Full on Windows to be the default but I understand that Windows users might not like that. And I can use $PSDefaultParameterValues for my personal set up. I guess you could wait until Windows gets a better paging utility before making -Full be the default on Windows.
RE help as an alias vs a function - I like the current implementation where help is a function because on Windows I can override the function and replace more with less. :-) And folks might have a preference for a different paging utility especially on Linux/macOS. So having Get-Help not be paged by default gives me the ability to choose a pager e.g. Get-Help iwr | less.
BTW for that help function, maybe we could get a preference variable for the paging utility to use - perhaps $PSHelpPager? If not, I can continue to override the function. :-)
We can make the pager smarter to ask if we want to get full help.
In the case we could set paging default on all platforms for Help. I believe we should leave Get-Help "as is" if anybody want grab a help text in scripts. I haven't thought about it before, but I use Help fuction most often then Get-Help.
I'll remind that we're planning (1) remove HelpSystem from Engine and make it more flexible, (2) to use MD-based help - the pager must support Markdown (colouring?).
Personally, I most often prefer to use online help because for other product modules, I need not only a description of the cmdlet but also blogs, technology and product articles that are searched through the search engine.
Dumping ten screensfull of plaintext, monochrome help into the scrollback feels archaic, compared to Get-Help -Online. Or even Get-Help -ShowWindow. Being in the scrollback means you can't type or try your command, even a good pager takes over the entire screen until you quit it.
Is there any way the default help could show you something you can reference while writing and trying commands?
HumanEquivalentUnit the latter point about showing reference while still using the console is something we're looking to address during 6.1.0 timeframe.
Keith Hill (@rkeithhill) the problem is that $env:PAGER is $null by default unless explicitly set and if $null it defaults to more on Windows and less on non-Windows.
Makes sense. I was going to suggest that folks could write a simple script:
# C:\no-pager.ps1
$input
and then set $env:PAGER = "C:\no-pager.ps1" but the more function is designed to only work with apps. :-( I guess the more function could be made to recognize a value of None but not sure if it's worth it.
@PowerShell/powershell-committee reviewed this and is fine with showing the full help on all systems (Windows, macOS, Linux) and paging by default for help function and no changes to get-help (not paging). Longer term, we would like to have help be an alias of get-help instead of a function that has different behavior.
OK so the current implementation in PR #5195 just needs to be modified to remove the (!$IsWindows -or (Test-Path env:PAGER)) part of the if condition, right?
Activity
iSazonov commentedon Sep 30, 2017
Maybe Help function should ask about show full help?
bergmeister commentedon Sep 30, 2017
Even on Windows, I found that Get-Help without an additional Parameter was not very helpful most of the times. I would welcome it if showed e.g. at least one of the examples and maybe the
OUTPUTSsection. I agree with Ilya (@iSazonov) that it would be useful to have a prompt that says something likeShow More? Y/NSteveL-MSFT commentedon Sep 30, 2017
For 6.1.0, we intend to revisit the whole helpsystem as well as rendering. For 6.0.0, we could default to showing full help if that is more useful for the majority of the time.
rkeithhill commentedon Sep 30, 2017
I would prefer the help system default to full help. I believe emitting full help on Linux and macOS is much less of an issue because these OSs have decent paging utilities (and those users know how to use those utilities).
BTW Windows SERIOUSLY needs a better paging utility than more.com which is like using stone knives and bear skins compared to using less. :-)
SteveL-MSFT commentedon Sep 30, 2017
Paging is one of the things we'll resolve along with the updated helpsystem during 6.1.0 timeframe.
iSazonov commentedon Oct 1, 2017
I mean that users are more likely to use Help function than Get-Help cmdlet. We could enhance the function and don't change the cmdlet until 6.1.0.
SteveL-MSFT commentedon Oct 1, 2017
Ilya (@iSazonov) that's an option, however, if the majority of cases is that they answer 'y', it seems showing the full help when using
helpsince it gets paged would also workRichardSiddaway commentedon Oct 1, 2017
Defaulting to showing the full help contents would be best - especially on Windows. I'd prefer to have everything and scroll through rather than have it paged. Paging just makes things slower and adds negative value.
I never understood why the default was to show a cut down version when the most useful parts are the examples and the parameter descriptions when you're trying to understand how to use a cmdlet.
rkeithhill commentedon Oct 1, 2017
RichardSiddaway That's because the pager on Windows sucks. When you use something like
lessyou can scroll line-by-line or by pages and you can search for terms. Searching a help topic like this is very handy.I know some folks don't like this next feature but when you do quit the pager (yeah, yeah pressing q is a bit weird) the helpt text is gone from the buffer so you can see your last command without having to scroll.
Besides, folks on Linux and macOS will expect help to be paged just like
manon those platforms pages its output.abaddon82 commentedon Oct 3, 2017
I'm not sure what the plans for paging in regards to the help system are, but I'm more of the opinion that Powershell in general could use some sort of Out-Pager.
joeyaiello commentedon Oct 4, 2017
Steve Lee (@SteveL-MSFT) and I just spoke on this in our @PowerShell/powershell-committee meeting (no quorum).
We agree wholeheartedly on a few points:
-Fullshould be the default (especially given default paging)Out-Pager(even if it's just a wrapper on the default pager, similar to the implementation inGet-Command help | Format-List Definition)We're a little less sure on:
helpfunction pages by default, and people are always confused there, butmore.comis also really...not good.helpfunction an alias, and haveGet-Helpandhelpdo the same thing (whether that's paging or not paging).Thoughts?
rkeithhill commentedon Oct 5, 2017
I'm a bit less concerned about
Get-Helpon Windows. Personally I'd prefer-Fullon Windows to be the default but I understand that Windows users might not like that. And I can use $PSDefaultParameterValues for my personal set up. I guess you could wait until Windows gets a better paging utility before making-Fullbe the default on Windows.RE help as an alias vs a function - I like the current implementation where help is a function because on Windows I can override the function and replace
morewithless. :-) And folks might have a preference for a different paging utility especially on Linux/macOS. So havingGet-Helpnot be paged by default gives me the ability to choose a pager e.g.Get-Help iwr | less.BTW for that
helpfunction, maybe we could get a preference variable for the paging utility to use - perhaps$PSHelpPager? If not, I can continue to override the function. :-)iSazonov commentedon Oct 5, 2017
We can make the pager smarter to ask if we want to get full help.
In the case we could set paging default on all platforms for
Help. I believe we should leave Get-Help "as is" if anybody want grab a help text in scripts. I haven't thought about it before, but I useHelpfuction most often thenGet-Help.I'll remind that we're planning (1) remove HelpSystem from Engine and make it more flexible, (2) to use MD-based help - the pager must support Markdown (colouring?).
Personally, I most often prefer to use online help because for other product modules, I need not only a description of the cmdlet but also blogs, technology and product articles that are searched through the search engine.
5 remaining items
HumanEquivalentUnit commentedon Oct 6, 2017
Dumping ten screensfull of plaintext, monochrome help into the scrollback feels archaic, compared to
Get-Help -Online. Or evenGet-Help -ShowWindow. Being in the scrollback means you can't type or try your command, even a good pager takes over the entire screen until you quit it.Is there any way the default help could show you something you can reference while writing and trying commands?
SteveL-MSFT commentedon Oct 6, 2017
HumanEquivalentUnit the latter point about showing reference while still using the console is something we're looking to address during 6.1.0 timeframe.
SteveL-MSFT commentedon Oct 6, 2017
Keith Hill (@rkeithhill) the problem is that
$env:PAGERis$nullby default unless explicitly set and if$nullit defaults tomoreon Windows andlesson non-Windows.rkeithhill commentedon Oct 6, 2017
Makes sense. I was going to suggest that folks could write a simple script:
and then set
$env:PAGER = "C:\no-pager.ps1"but themorefunction is designed to only work with apps. :-( I guess themorefunction could be made to recognize a value ofNonebut not sure if it's worth it.SteveL-MSFT commentedon Oct 6, 2017
Not a great solution, but people can always overwrite the
morefunctionSteveL-MSFT commentedon Nov 1, 2017
@PowerShell/powershell-committee reviewed this and is fine with showing the full help on all systems (Windows, macOS, Linux) and paging by default for
helpfunction and no changes toget-help(not paging). Longer term, we would like to havehelpbe an alias ofget-helpinstead of a function that has different behavior.rkeithhill commentedon Nov 2, 2017
OK so the current implementation in PR #5195 just needs to be modified to remove the
(!$IsWindows -or (Test-Path env:PAGER))part of theifcondition, right?SteveL-MSFT commentedon Nov 2, 2017
Keith Hill (@rkeithhill) yes, I believe that should be sufficient
help function displays full help on all platforms