to reproduce this bug: cd ~ mkdir aaa cd aaa rm ~/aaa -r cd . then current working directory is just "." and you can do nothing until cd into an absolute path.