shell: Fix command completion logic

Similar fix as in commit b26ca13672. Just later in the same
function. This is how the logic used to be before quite heavy redesign
that happened a while ago.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-07-07 20:48:21 +03:00 committed by Anas Nashif
commit 5c3d5660ef

View file

@ -519,7 +519,7 @@ static struct shell_module *get_completion_module(char *str,
str = strchr(str, ' ');
/* only two parameters are possibles in case of no default module */
return str ? dest : NULL;
return str ? NULL : dest;
}
static u8_t completion(char *line, u8_t len)