Re: Got it
No prob!
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
$file=$args[0]
$file=$file.replace('\', '/')
$file=$file.replace('"', '')
$file=$file.replace('C:', '/mnt/c')
C:\Windows\System32\wsl.exe -u root sh -c "/usr/local/bin/nvim --server localhost:6666 --remote $file"
import subprocess
import sys
file = sys.argv[1]
print(f"\nFile on Windows: {file}")
file = file.replace('\\', '/')
file = file.replace('"', '')
file = file.replace('C:', '/mnt/c')
print(f"\nFile from WSL: {file}\n")
subprocess.check_output(f"C:\\Windows\\System32\\wsl.exe -u root sh -c \"/usr/local/bin/nvim --server localhost:6666 --remote {file}\"")
python.exe "C:\tools\wsl_nvim.py" !.!
nvim -n --headless --listen localhost:6666 &
neovide.exe --server localhost:6666
pwsh.exe -ExecutionPolicy Bypass -File "C:\tools\ps_wsl_nvim.ps1" !.!
Set-Variable "nvim_path=/usr/local/bin/nvim"
Set-Variable "file=%~1"
# rem Replace backslashes with forward slashes and remove quotes
Set-Variable "file=%file:\=/%"
Set-Variable "file=%file:\=%"
# rem Extract the drive letter and the path
Set-Variable "drive=%file:~0,1%"
Set-Variable "path=%file:~2%"
# rem Combine them into the WSL path format
Set-Variable "wsl_path=/mnt/c%path%"
C:\Windows\System32\wsl.exe -u root sh -c "/usr/local/bin/nvim --server localhost:6666 --remote \"%wsl_path%\""
C:\tools\ps_wsl_nvim.ps1
wsl nvim --server localhost:6666 --remote <file>
powershell.exe -ExecutionPolicy Bypass "C:\tools\ps_wsl_nvim.ps1" !.!
& "wsl.exe nvim --server localhost:6666 --remote"
wsl.exe nvim --server localhost:6666 --remote !.!
<wslpath>wsl.exe nvim --server localhost:6666 --remote !.!
powershell.exe -ExecutionPolicy Bypass "wsl.exe nvim --server localhost:6666 --remote" /mnt/c/!.!