Rename --hex to --hex-mode

This commit is contained in:
Martin Lund 2022-06-17 10:56:12 +02:00
parent a826bf4fcb
commit 1b2f445ed9
3 changed files with 5 additions and 5 deletions

View file

@ -123,7 +123,7 @@ If defining more than one flag, the flags must be comma separated.
.RE
.TP
.BR \-x ", " \-\-hex
.BR \-x ", " \-\-hex\-mode
Enable hexadecimal mode.

View file

@ -27,7 +27,7 @@ _tio()
-L --list-devices \
-c --color \
-S --socket \
-x --hex \
-x --hex-mode \
-v --version \
-h --help"
@ -102,7 +102,7 @@ _tio()
COMPREPLY=( $(compgen -W "unix: inet: inet6:" -- ${cur}) )
return 0
;;
-x | --hex)
-x | --hex-mode)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;

View file

@ -88,7 +88,7 @@ void print_help(char *argv[])
printf(" -m, --map <flags> Map special characters\n");
printf(" -c, --color 0..255|none|list Colorize tio text (default: 15)\n");
printf(" -S, --socket <socket> Listen on socket\n");
printf(" -x, --hex Enable hexadecimal mode\n");
printf(" -x, --hex-mode Enable hexadecimal mode\n");
printf(" -v, --version Display version\n");
printf(" -h, --help Display help\n");
printf("\n");
@ -199,7 +199,7 @@ void options_parse(int argc, char *argv[])
{"socket", required_argument, 0, 'S' },
{"map", required_argument, 0, 'm' },
{"color", required_argument, 0, 'c' },
{"hex", no_argument, 0, 'x' },
{"hex-mode", no_argument, 0, 'x' },
{"version", no_argument, 0, 'v' },
{"help", no_argument, 0, 'h' },
{0, 0, 0, 0 }