Maybe you could add comments like 'iterate over lists' and 'iterate over list-entries' here and below.
Also, the use of `sizeof(entry)` irritated me, `sizeof(shell_command_t)` would make this a little clearer I guess.