summaryrefslogtreecommitdiffstats
path: root/login-utils/chsh.c
diff options
context:
space:
mode:
authorAndreas Henriksson2017-01-19 23:04:47 +0100
committerAndreas Henriksson2017-01-19 23:11:42 +0100
commit631a195412f53135179f761573a56e457911603f (patch)
tree9a1613a1d3c59a0d93590f2d244140e6cb630fe9 /login-utils/chsh.c
parentman: chsh(1): add login.defs to SEE ALSO (diff)
downloadkernel-qcow2-util-linux-631a195412f53135179f761573a56e457911603f.tar.gz
kernel-qcow2-util-linux-631a195412f53135179f761573a56e457911603f.tar.xz
kernel-qcow2-util-linux-631a195412f53135179f761573a56e457911603f.zip
chsh: use -h as shorthand for --help instead of -u
The -u is still supported (but no longer documented). (This matches the switches used by shadow chsh.)
Diffstat (limited to 'login-utils/chsh.c')
-rw-r--r--login-utils/chsh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/login-utils/chsh.c b/login-utils/chsh.c
index 79fc19d2c..c7defd49f 100644
--- a/login-utils/chsh.c
+++ b/login-utils/chsh.c
@@ -131,18 +131,19 @@ static void parse_argv(int argc, char **argv, struct sinfo *pinfo)
static const struct option long_options[] = {
{"shell", required_argument, 0, 's'},
{"list-shells", no_argument, 0, 'l'},
- {"help", no_argument, 0, 'u'},
+ {"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{NULL, no_argument, 0, '0'},
};
int c;
- while ((c = getopt_long(argc, argv, "s:luv", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "s:lhuv", long_options, NULL)) != -1) {
switch (c) {
case 'v':
printf(UTIL_LINUX_VERSION);
exit(EXIT_SUCCESS);
- case 'u':
+ case 'u': /* deprecated */
+ case 'h':
usage(stdout);
case 'l':
get_shell_list(NULL);