wslpath
wslpath copied to clipboard
Can NOT run my code in the right path with wslpath in VScode!
I setup WSL Ubuntu in VScode but I still can't run my code in the right path with wslpath. How to fix this problem?
This is my settings.json
{ "code-runner.runInTerminal": true, "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe", "code-runner.executorMap": { "c": "cd $(wslpath $dir) & gcc $fileName -o $fileNameWithoutExt & ./$fileNameWithoutExt", "cpp": "g++ $fileName -o $fileNameWithoutExt -std=c++11 & ./$fileNameWithoutExt"}, "python": "python3 -u ./$fileName", }
When I run my code with "ctrl+alt+N"
The output became:
jamesqian@J:/mnt/c/Users/Jamesqian/Desktop/tmp$ cd $(wslpath "c:\Users\Jamesqian\Desktop\tmp\") & gcc test.c -o test & ./test