opensc-explorer: harmonize display of command arguments

* consistently show ellipsis for repeatable arguments as 3 dots
* embrace alternative mandatory arguments with curly braces
* use hyphens instead of spaces within non-literal arguments
  for improved alignment with the manual page
This commit is contained in:
Peter Marschall 2018-07-07 22:04:13 +02:00 committed by Frank Morgner
parent fa2421c89d
commit aed4b00145
1 changed files with 24 additions and 24 deletions

View File

@ -121,61 +121,61 @@ struct command {
static struct command cmds[] = { static struct command cmds[] = {
{ do_echo, { do_echo,
"echo", "[<string> ..]", "echo", "[<string> ...]",
"display arguments" }, "display arguments" },
{ do_ls, { do_ls,
"ls", "[<pattern> ..]", "ls", "[<pattern> ...]",
"list files in the current DF" }, "list files in the current DF" },
{ do_find, { do_find,
"find", "[<start id> [<end id>]]", "find", "[<start-id> [<end-id>]]",
"find all files in the current DF" }, "find all files in the current DF" },
{ do_find_tags, { do_find_tags,
"find_tags", "[<start tag> [<end tag>]]", "find_tags", "[<start-tag> [<end-tag>]]",
"find all tags of data objects in the current context" }, "find all tags of data objects in the current context" },
{ do_cd, { do_cd,
"cd", "{.. | <file id> | aid:<DF name>}", "cd", "{.. | <file-id> | aid:<DF-name>}",
"change to another DF" }, "change to another DF" },
{ do_cat, { do_cat,
"cat", "[<file id> | sfi:<sfi id>]" "cat", "[<file-id> | sfi:<sfi-id>]"
, "print the contents of an EF" }, , "print the contents of an EF" },
{ do_info, { do_info,
"info", "[<file id>]", "info", "[<file-id>]",
"display attributes of card file" }, "display attributes of card file" },
{ do_create, { do_create,
"create", "<file id> <size>", "create", "<file-id> <size>",
"create a new EF" }, "create a new EF" },
{ do_mkdir, { do_mkdir,
"mkdir", "<file id> <size>", "mkdir", "<file-id> <size>",
"create a new DF" }, "create a new DF" },
{ do_delete, { do_delete,
"delete", "<file id>", "delete", "<file-id>",
"remove an EF/DF" }, "remove an EF/DF" },
{ do_delete, { do_delete,
"rm", "<file id>", "rm", "<file-id>",
"remove an EF/DF" }, "remove an EF/DF" },
{ do_pininfo, { do_pininfo,
"pin_info", "{CHV|KEY|AUT|PRO}<key ref>", "pin_info", "{CHV|KEY|AUT|PRO}<key-ref>",
"get information on PIN or key from the card" }, "get information on PIN or key from the card" },
{ do_verify, { do_verify,
"verify", "{CHV|KEY|AUT|PRO}<key ref> [<pin>]", "verify", "{CHV|KEY|AUT|PRO}<key-ref> [<pin>]",
"present a PIN or key to the card" }, "present a PIN or key to the card" },
{ do_change, { do_change,
"change", "CHV<pin ref> [[<old pin>] <new pin>]", "change", "CHV<pin-ref> [[<old-pin>] <new-pin>]",
"change a PIN" }, "change a PIN" },
{ do_unblock, { do_unblock,
"unblock", "CHV<pin ref> [<puk> [<new pin>]]", "unblock", "CHV<pin-ref> [<puk> [<new-pin>]]",
"unblock a PIN" }, "unblock a PIN" },
{ do_put, { do_put,
"put", "<file id> [<input file>]", "put", "<file-id> [<input-file>]",
"copy a local file to the card" }, "copy a local file to the card" },
{ do_get, { do_get,
"get", "<file id> [<output file>]", "get", "<file-id> [<output-file>]",
"copy an EF to a local file" }, "copy an EF to a local file" },
{ do_get_data, { do_get_data,
"do_get", "<hex tag> [<output file>]", "do_get", "<hex-tag> [<output-file>]",
"get a data object" }, "get a data object" },
{ do_put_data, { do_put_data,
"do_put", "<hex tag> <data>", "do_put", "<hex-tag> <data>",
"put a data object" }, "put a data object" },
{ do_erase, { do_erase,
"erase", "", "erase", "",
@ -184,19 +184,19 @@ static struct command cmds[] = {
"random", "<count>", "random", "<count>",
"obtain <count> random bytes from card" }, "obtain <count> random bytes from card" },
{ do_update_record, { do_update_record,
"update_record", "<file id> <rec no> <rec offs> <data>", "update_record", "<file-id> <rec-no> <rec-offs> <data>",
"update record" }, "update record" },
{ do_update_binary, { do_update_binary,
"update_binary", "<file id> <offs> <data>", "update_binary", "<file-id> <offs> <data>",
"update binary" }, "update binary" },
{ do_apdu, { do_apdu,
"apdu", "<data>+", "apdu", "<data> ...",
"send a custom apdu command" }, "send a custom apdu command" },
{ do_asn1, { do_asn1,
"asn1", "[<file id>]", "asn1", "[<file-id>]",
"decode an ASN.1 file" }, "decode an ASN.1 file" },
{ do_sm, { do_sm,
"sm", "open|close", "sm", "{open|close}",
"call SM 'open' or 'close' handlers, if available"}, "call SM 'open' or 'close' handlers, if available"},
{ do_debug, { do_debug,
"debug", "[<value>]", "debug", "[<value>]",