windowspathcygwingit-bashconemu

Copy windows path into linux based terminals: Conemu, Cygwin, Git Bash


When I copy a windows path from windows explorer's location bar, C:\Users\Administrator\Links, it gets automatically translated to one of the following:

Cygwin in Conemu: /mnt/c/Users/Administrator/Links

Git bash in Conemu: /mnt/c/Users/Administrator/Links

Cygwin64 Terminal: (no translation) C:\Users\Administrator\Links

Git Bash on Windows: (no translation) C:\Users\Administrator\Links

But Cygwin actually wants C:/Users/Administrator/nextcloud/diary or /cygdrive/c/Users/Administrator/nextcloud/diary

and Git Bash actually wants /c/Users/Administrator/Links

So each time I try to cd into that directory, I get bash: cd: /mnt/c/Users/Administrator/Links: No such file or directory. Then I have to manually change the path.

Is there a way to change Conemu's "translation" rule? Do you experience the same problems when using linux terminals with/without Conemu? How did you cope with this?

Edit:

The Git Bash is started in Conemu by setting up a task with commands: C:\Program Files\Git\git-cmd.exe --no-cd --command=usr/bin/bash.exe -l -i -new_console:t:"Git Bash" and Cygwin is started in Conemu with commands D:\app\cygwin64\Cygwin.bat -new_console:t:"cygwin"


Solution

  • I ran into the same problem using Cmder (which uses Conemu). In the launch options (in Cmder, it's in Startup - Tasks), you must select the task (for example bash :: bash) and add:

    -cur_console: m: "".

    Indeed, according to the documentation:

    https://conemu.github.io/en/NewConsole.html#syntax

    in the options of -cur_console, we can read:

    m: / mnt - defines ‘/ mnt’ prefix for Unix-path conversion, m: "" - no prefix