shell: Fix command completion logic
shell: Fix command completion logic

Similar fix as in commit b26ca136726aee3927. 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 <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>

Vudentz/zephyr,ldts/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,nashif/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,kraj/zephyr,nashif/zephyr,explora26/zephyr,finikorg/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,kraj/zephyr,zephyrproject-rtos/zephyr,punitvara/zephyr,ldts/zephyr,punitvara/zephyr,Vudentz/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,punitvara/zephyr,galak/zephyr,explora26/zephyr,nashif/zephyr,ldts/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,finikorg/zephyr,kraj/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,explora26/zephyr