diff options
author | Timo Weingärtner <timo@tiwe.de> | 2016-08-27 21:44:17 +0200 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2016-08-27 21:59:07 +0200 |
commit | bfa8ac40e032d4d204ab6a9202531198cee9706e (patch) | |
tree | 42691a8d53741d66dcb42359d16f0e2326f1133a /ssh-agent-filter.C | |
parent | dc582af6e7a1e645402f333e200b8ff718de1b48 (diff) | |
download | ssh-agent-filter-bfa8ac40e032d4d204ab6a9202531198cee9706e.tar.gz |
exploit more help2man features
use an include file for explanatory text
add environment, author and bug report information to the program's output
Diffstat (limited to 'ssh-agent-filter.C')
-rw-r--r-- | ssh-agent-filter.C | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 30aaf9a..0fb6861 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -192,7 +192,7 @@ int make_listen_sock () { } void parse_cmdline (int const argc, char const * const * const argv) { - po::options_description opts{"OPTIONS"}; + po::options_description opts{"Options"}; opts.add_options() ("all-confirmed,A", po::bool_switch(&all_confirmed),"allow all other keys with confirmation") ("comment,c", po::value(&allowed_comment), "key specified by comment") @@ -211,13 +211,19 @@ void parse_cmdline (int const argc, char const * const * const argv) { notify(config); if (config.count("help")) { - cout << "Usage: ssh-agent-filter [ OPTIONS ]" << endl; - cout << opts << endl; + cout << "Usage: ssh-agent-filter [ OPTIONS ]\n"; + cout << opts; + cout << "Environment:\n"; + cout << " SSH_AUTH_SOCK socket of upstream ssh-agent\n"; + cout << " SSH_ASKPASS command to run for confirmation questions\n"; exit(EX_OK); } if (config.count("version")) { - cout << SSH_AGENT_FILTER_VERSION << endl; + cout << SSH_AGENT_FILTER_VERSION "\n"; + cout << "Written by Timo Weingärtner.\n"; + cout << "Report bugs to the Debian BTS at https://bugs.debian.org/\n"; + cout << "or by mail to timo@tiwe.de.\n"; exit(EX_OK); } |