| 458 | |
| 459 | |
| 460 | std::string SingleCommandOption::call_argument_helper_callback(const std::string &opt_name) |
| 461 | { |
| 462 | if (nullptr == arg_helper_func) |
| 463 | { |
| 464 | return ""; |
| 465 | } |
| 466 | |
| 467 | // If this option has optional arguments, only suggest values if the option |
| 468 | // has a trailing '=' |
| 469 | if ((optional_argument == getopt_option.has_arg |
| 470 | || optional_argument == getopt_alias.has_arg) |
| 471 | && (opt_name.rfind("=") == std::string::npos)) |
| 472 | { |
| 473 | return ""; |
| 474 | } |
| 475 | |
| 476 | return arg_helper_func(); |
| 477 | } |
| 478 | |
| 479 | |
| 480 | std::string SingleCommandOption::getopt_optstring() |