Cygwin not converting DOS space to POSIX "\ "

0

When I start a new cygwin64 tern, the $PATH variable is set to DOS parameters (paths with spaces) which are not properly converted. Does anyone know how to get cygwin to correctly convert the windows paths to POSIX paths?

.bashrc contains "export $PATH"

bash: /cygdrive/c/Program: No such file or directory bash: export: /cygdrive/c/Program': not a valid identifier bash: export:(x86)/AMD': not a valid identifier bash: export: APP/bin/x86_64:/cygdrive/c/Program': not a valid identifier bash: export:(x86)/AMD': not a valid identifier bash: export: APP/bin/x86:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft': not a valid identifier bash: export: mpi/bin:/cygdrive/c/program': not a valid identifier bash: export:(x86)/nvidia': not a valid identifier bash: export: corporation/physx/common:/cygdrive/c/programdata/oracle/java/javapath:/cygdrive/c/python34:/cygdrive/c/python34/scripts:/cygdrive/c/windows/system32:/cygdrive/c/windows:/cygdrive/c/windows/system32/wbem:/cygdrive/c/windows/system32/windowspowershell/v1.0:/cygdrive/c/program': not a valid identifier bash: export:(x86)/microsoft': not a valid identifier bash: export: server/100/tools/binn:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft': not a valid identifier bash: export: server/100/tools/binn:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft': not a valid identifier bash: export: server/100/dts/binn:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft': not a valid identifier bash: export: server/120/tools/binn:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft': not a valid identifier bash: export: server/130/tools/binn:/cygdrive/c/program': not a valid identifier bash: export:(x86)/nodejs:/cygdrive/c/program': not a valid identifier bash: export: (x86)/windows': not a valid identifier bash: export:kits/10/windows': not a valid identifier bash: export: toolkit:/cygdrive/c/program': not a valid identifier bash: export:files/microsoft/web': not a valid identifier bash: export: installer:/cygdrive/c/program': not a valid identifier bash: export:files/dotnet:/cygdrive/c/program': not a valid identifier bash: export: files/mysql/mysql': not a valid identifier bash: export:1.6:/cygdrive/c/program': not a valid identifier bash: export: (x86)/windows': not a valid identifier bash: export:kits/8.1/windows': not a valid identifier bash: export: toolkit:/cygdrive/c/program': not a valid identifier bash: export:(x86)/microsoft': not a valid identifier bash: export: server/client': not a valid identifier bash: export:sdk/odbc/130/tools/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/140/tools/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/140/dts/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/140/tools/binn/managementstudio:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/110/dts/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/120/dts/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:server/130/dts/binn:/cygdrive/c/program': not a valid identifier bash: export: (x86)/microsoft': not a valid identifier bash: export:manager/1.0:/cygdrive/c/program': not a valid identifier bash: export: files/git/cmd:/cygdrive/c/program': not a valid identifier bash: export:(x86)/ati': not a valid identifier bash: export: technologies/ati.ace/core-static:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32/wbem:/cygdrive/c/WINDOWS/system32/windowspowershell/v1.0:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/WINDOWS/System32/LibreSSL:/cygdrive/c/Program': not a valid identifier bash: export:Files/PuTTY:/cygdrive/c/WIndows/system32:/cygdrive/c/Program': not a valid identifier bash: export: (x86)/Pico': not a valid identifier bash: export:Technology/PicoScope6:/cygdrive/c/Program': not a valid identifier bash: export: Files/Java/jdk1.8.0_102/bin:/cygdrive/d/Users/CE/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program': not a valid identifier bash: export:(x86)/Microsoft': not a valid identifier bash: export: `Code/bin:/cygdrive/d/Users/CE/AppData/Local/atom/bin:/cygdrive/d/Users/CE/AppData/Local/Microsoft/WindowsApps:/cygdrive/d/Users/CE/AppData/Local/GitHubDesktop/bin:/usr/bin:/cygdrive/c/esp-idf:/cygdrive/e/Arduino': not a valid identifier

CeS

Posted 2019-07-31T21:50:54.433

Reputation: 1

1Use export PATH (instead of export $PATH). When you do need to use $PATH (or another variable expansion) in command, put double-quotes around it. – Gordon Davisson – 2019-07-31T23:06:42.357

No answers