0

I'm using wsl ubuntu on windows 10, and I have a directory that I had been storing python projects in before I started using wsl at C:\Users\____\Onedrive\Documents\Python Projects. I have created a link to ~/Python Projects with ln -s /mnt/c/users/___/onedrive/documents/Python\ Projects ~/Python\ Projects. Now when I open neovim with nvim ~/Python\ Projects and do :pwd I get /mnt/c/users/___/onedrive/documents/Python Projects when I should get ~/Python Projects. Also, opening a new tmux pane with Ctrl+b ", the working directory is /mnt/c/users/___/onedrive/documents/Python\ Projects.

I understand why this is happening - soft links (which are the only kind of links that can point to directories) are not copies of directories, they just point to other ones, so cd [soft link] actually takes you to the source of the soft link, but the prompt actually shows the destination of the soft link (so cd ~/Python Projects shows ~/Python Projects in the prompt, not /mnt/c/users/___/onedrive/documents/Python\ Projects). This is all I want to do - have it show ~/Python Projects even though it's actually in /mnt/c/users/___/onedrive/documents/Python\ Projects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.