Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ctrlp creates empty directories in working directory #521

unblevable opened this Issue Jan 26, 2014 · 1 comment


None yet
2 participants

When I use ctrlp to open a file that's in my home directory, I tend to do this:

~/.vimrc <c-t>

Ctrlp always opens the correct file, but it leaves a directory named ~ in the working directory.

I accidentally typed this command once to get rid of one of those directories...

# what I did
rm -r ~
# what I was supposed to do
rm -r ./~

and I ended up deleting my entire home directory. I feel newbies could make the same mistake.

Ctrlp does the same when I accidentally use other symbols such as ```, !, etc.


kien commented Jan 27, 2014

If you're already in the home directory, typing the extra ~/ will show you a NO ENTRIES message, because ~/~/.vimrc doesn't exist. And if you keep trying to open it, CtrlP will attempt to create the file including the path to it.

I guess the same thing happens with those symbols, there are no files with them in their names.

I don't think I should add workarounds to prevent cases like this. The NO ENTRIES is very apparent. Someone could make a typo, or type <c-y> by mistake, or any other things. I don't think they should or could be prevented.

@kien kien closed this Jan 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment