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