[GTALUG] Bash does-directory-exist question

Christopher Browne cbbrowne at gmail.com
Fri Jul 10 14:17:32 EDT 2020


On Fri, 10 Jul 2020 at 09:39, Giles Orr via talk <talk at gtalug.org> wrote:

> The worst case I've seen is 'git', and this is what's brought me back
> to this puzzle. If you're in a directory and you 'git rm' the last
> file in the directory, 'git' will helpfully delete the directory as
> well.  Never mind that you're still in the directory, and are now in
> the very confusing position of being in a non-existent directory.
>

Huh.  I just experienced this situation for (as far as I can tell) the
very first time about 1/2h ago.  I was in a directory, did a merge
that got rid of the only file in $PWD, and found myself in that
somewhat odd place.

I wasn't overly confused at it; I realized that a broadly reasonable
thing was happening.   But yeah, it was strange.

I was in zsh rather than bash; that made little difference in the
matter.  I had a strange looking prompt, but all resolved fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20200710/d6039e3e/attachment.html>


More information about the talk mailing list