Bug 3115 - Add --help
Summary: Add --help
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 8.1p1
Hardware: Other Linux
: P5 trivial
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-27 09:33 AEDT by Dan Jacobson
Modified: 2021-03-04 09:52 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Jacobson 2020-01-27 09:33:16 AEDT
Add a --help option to all the commands, as the one non-accidental way to trigger the usage messages.

$ scp --help
$ ssh --help
etc.

Already works like
$ cat --help
except for the "unknown option" and error $? value.

$ ssh --help
unknown option -- -
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]
$ echo $?
255

Anyway, all other modern Unix commands have --help or -h etc. Yes, even if they have man pages.
Comment 1 Damien Miller 2020-05-29 15:06:21 AEST
Sorry, we are not going to support GNU-style long getopt options. OpenSSH comes from a different tradition.
Comment 2 Damien Miller 2021-03-04 09:52:22 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle