A question I already asked myself a few times is why I can't delete the current working directory using rm -r .
The shell does not have a problem with a non-existing directory as working directory, so I just created an alias for rm -r "../$(basename "$(pwd)")".
Why is there a difference between these two rms, while the output of realpath . and realpath "../$(basename "$(pwd)")" does not differ and the cwd of the rm is also the same?