* @brief Parse a string into a long, with full validation. * * Same rules as `cli_parse_int`, but for the wider `long` range — useful for * sizes, counts, or ids that may exceed `int`. * * @param value Null-terminated string to parse. May be NULL (returns false). * @param out Receives the parsed value on success. Must not be NULL. * @return true if @p value is a valid long (written to @p
| 1956 | |
| 1957 | parser->commands[i].aliases = newAliases; |
| 1958 | parser->commands[i].aliases[parser->commands[i].numAliases] = copy; |
| 1959 | parser->commands[i].numAliases++; |
| 1960 | cli_last_error.code = CLI_SUCCESS; |
| 1961 | snprintf(cli_last_error.message, sizeof(cli_last_error.message), "Success: Alias '%s' registered.", alias); |
| 1962 | |
| 1963 | CLI_LOG("[cli_register_command_alias] Alias '%s' registered for command '%s'.\n", alias, commandName); |
| 1964 | return true; |
| 1965 | } |
| 1966 | } |
| 1967 | |
| 1968 | snprintf(cli_last_error.message, sizeof(cli_last_error.message), "Error: Command '%s' not found.", commandName); |
| 1969 | cli_last_error.code = CLI_ERROR_COMMAND_NOT_FOUND; |
| 1970 | CLI_LOG("[cli_register_command_alias] Error: Command '%s' not found.\n", commandName); |
| 1971 | return false; |
| 1972 | } |
| 1973 | |
| 1974 | |
| 1975 | /** |
| 1976 | * @brief Prompts the user for confirmation with a customizable message. |
| 1977 | * |
| 1978 | * This function displays a prompt message asking the user for a yes/no confirmation. |
nothing calls this directly
no outgoing calls
no test coverage detected