Improve handling of empty commands in autocompletion, fixing #63