Not replying for Chet, who will have the definitive answer, I will say that I, personally, think that is working as designed. ~ 0 (with space between) is definitely the "not" operator. But without the middle space, ~0, where there is a white space character in front of the tilde, looks to me like the normal "get the home directory for the following id" processing. Eg: ~0 gets the home for the 0 user (same as ~user) whereas in "a~0", then tilde is simply a character. This is basically how ever other Bourne type shell seems to work.