== SYNOPSIS
-*chsh* [*-s* _shell_] [*-l*] [*-h*] [*-v*] [_username_]
+*chsh* [*-s* _shell_] [*-l*] [*-h*] [*-V*] [_username_]
== DESCRIPTION
*-l*, *--list-shells*::
Print the list of shells listed in _/etc/shells_ and exit.
+*-h*, *--help*::
+Display help text and exit. The short options *-h* have been used since version 2.30; old versions use
+deprecated *-u*.
+
+*-V*, *--version*::
+Print version and exit. The short options *-V* have been used since version 2.39; old versions use
+deprecated *-v*.
+
include::man-common/help-version.adoc[]
== VALID SHELLS
fputs(USAGE_OPTIONS, fp);
fputs(_(" -s, --shell <shell> specify login shell\n"), fp);
fputs(_(" -l, --list-shells print list of shells and exit\n"), fp);
+
fputs(USAGE_SEPARATOR, fp);
- printf( " -u, --help %s\n", USAGE_OPTSTR_HELP);
- printf( " -v, --version %s\n", USAGE_OPTSTR_VERSION);
+ printf(USAGE_HELP_OPTIONS(22));
+
printf(USAGE_MAN_TAIL("chsh(1)"));
exit(EXIT_SUCCESS);
}
{"shell", required_argument, NULL, 's'},
{"list-shells", no_argument, NULL, 'l'},
{"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
{NULL, 0, NULL, 0},
};
int c;
- while ((c = getopt_long(argc, argv, "s:lhuv", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "s:lhuvV", long_options, NULL)) != -1) {
switch (c) {
- case 'v':
+ case 'v': /* deprecated */
+ case 'V':
print_version(EXIT_SUCCESS);
case 'u': /* deprecated */
case 'h':