cd Command in ConEmu and MinGW

2

I'm running MinGW bash in ConEmu and have set the HOME variable to my desired directory c/Users/<username> in the MinGW/msys/1.0/etc/profile file. The problem is that when I enter cd in ConEmu, it appends the HOME directory to the current one. For example, if I start ConEmu and run cd, it changes to the (nonexistant) directory c/Users/<username>/c/Users/<username>. Furthermore, once in this directory, running cd again results in the error bash.exe": cd: c/Users/<username>: No such file or directory.

This is not an issue in the Git Bash shell that came with MinGW, so I'm pretty sure this is an issue with ConEmu.

bcf

Posted 2017-03-13T16:00:12.500

Reputation: 1 273

Have you checked if alias brings up anything relevant? – paradroid – 2017-03-16T13:05:22.780

Actually, I don't believe you can't reproduce the same without ConEmu. – Maximus – 2017-03-17T09:51:56.860

Answers

1

The root directory on Unix is /. Normally, Unix commands will try to open files and directories relative to the current directory if your path does not start with /.

It seems like running cd in bash is currently trying to look for a directory called c inside the current directory, rather than /c in the root of the filesystem.

Instead of setting your HOME to c/Users/<username>, try /c/Users/<username> (with the / at the start).

Candy Gumdrop

Posted 2017-03-13T16:00:12.500

Reputation: 126