shell: fix minor bug with basename for login shells -zsh and -bash

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>