-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Enhance PowerShell full command line help #4986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@iSazonov this is for the PowerShell binary, correct?
Most Linux commands show usage and how to obtain help ( |
@markekraus The Issue is for discussion to collect ideas. :-) I like short help on error too. We mean an interactive session where typos is a common matter - full help will going to annoy. |
@iSazonov by "We mean an interactive session where typos is a common matter" example:
|
No, the Issue consider command line only |
Ok then. Something like this:
|
We can be very short and show only |
I personally like being shown the syntax. that way something like this
doesn't require me to read the full help to see that it was supposed to be
|
Users will most often see this help when there are typos. For newbie "PowerShell[.exe] -Help" is good start. |
Syntax is useful for typos, IMO.
then I can easily compare what I typed versus what the correct parameter is. If I have to run the full help and my command goes off screen, I can't easily compare. I may have to scroll and depending on the console I'm working in. that can be either impossible or painful. |
From my limited test of Linux commands it seems most complain about the unknown parameter and just tells how to get help. However, I'm not against showing just the syntax. |
@mklement0 Could you please comment? Have you ideas? |
I agree that the must-have components are:
A concise syntax diagram can be helpful, but the emphasis is on concise - such as in @markekraus's hypothetical example - whereas the current I'm not sure if POSIX mandates the format response to invalid command syntax for compliant utilities; in practice, you get instances of error message only, error message + help tip, and syntax only. Some examples: # BSD ls (macOS)
$ ls -y
ls: illegal option -- y
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
# GNU ls
$ ls -y
ls: invalid option -- 'y'
Try 'gls --help' for more information.
# BSD grep
$ grep -y
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
# GNU grep
Usage: ggrep [OPTION]... PATTERN [FILE]...
Try 'ggrep --help' for more information. |
I really don't like scrolling so based on samples above I still suggest start with
Online Help link can be useful for Web/Azure scenarios. |
cc @joeyaiello @HemantMahawar for some opinions here |
Uh oh!
There was an error while loading. Please reload this page.
The Issue consider command line only powershell -Help (in bash or cmd.exe).
The text was updated successfully, but these errors were encountered: