Skip to content

Instantly share code, notes, and snippets.

@irizwaririz
Last active August 24, 2023 07:48
Show Gist options
  • Save irizwaririz/f2bf05f450c2e1063cc0f59af42e3b6f to your computer and use it in GitHub Desktop.
Save irizwaririz/f2bf05f450c2e1063cc0f59af42e3b6f to your computer and use it in GitHub Desktop.
Debugging how to make Text Editor Anywhere work with WSL's vim inside of simple terminal
C:\Windows\System32\cmd.exe
/k C:\Windows\sysnative\wsl.exe -e bash -lic "vim %1"
C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt)"
C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt
/mnt/c/Users/admin/Downloads/TEAPortable/TextEditorAnywhere/Temp/TextEditorAnywhere_14_11_100.txt
printf '%s\n' "C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt" | sed 's/\\/\//g'
printf '%s\n' "C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt" | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g'
echo 'C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g'
C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo 'C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
C:/Windows/sysnative/wsl.exe -e bash -lic "st -e vim $(echo 'C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
C:/Windows/sysnative/bash.exe -lic "st -e vim $(echo 'C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
=====
C:\Windows\System32\cmd.exe
/k C:/Windows/sysnative/wsl.exe -e bash -lic "vim %1"
/k C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo '%1')"
/k C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo '%1' | sed 's/\\/\//g')"
/k C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo '%1' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
/k C:/Windows/sysnative/bash.exe -lic "st -e vim $(echo '%1' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
/c C:/Windows/sysnative/bash.exe -lic "st -e vim $(echo '%1' | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/g')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment