Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/shell: drop _builtin_cmds define #18075

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions sys/shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ XFA_INIT_CONST(shell_command_t*, shell_commands_xfa);
#define flush_if_needed()
#endif /* MODULE_NEWLIB || MODULE_PICOLIBC */

#ifdef MODULE_SHELL_COMMANDS
#define _builtin_cmds _shell_command_list
#else
#define _builtin_cmds NULL
#endif

#define SQUOTE '\''
#define DQUOTE '"'
#define ESCAPECHAR '\\'
Expand Down Expand Up @@ -117,8 +111,8 @@ static shell_command_handler_t find_handler(
handler = search_commands(command_list, command);
}

if (handler == NULL && _builtin_cmds != NULL) {
handler = search_commands(_builtin_cmds, command);
if (IS_USED(MODULE_SHELL_COMMANDS) && handler == NULL) {
handler = search_commands(_shell_command_list, command);
}

if (handler == NULL) {
Expand Down Expand Up @@ -152,8 +146,8 @@ static void print_help(const shell_command_t *command_list)
print_commands(command_list);
}

if (_builtin_cmds != NULL) {
print_commands(_builtin_cmds);
if (IS_USED(MODULE_SHELL_COMMANDS)) {
print_commands(_shell_command_list);
}

print_commands_xfa();
Expand Down