Created
August 15, 2025 05:43
-
-
Save surajsharma/d9b651726487da8f408a993752bd2d2b to your computer and use it in GitHub Desktop.
subl in linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Convert WSL path to Windows path | |
if [ "$1" = "." ]; then | |
WINPATH=$(wslpath -w $(pwd)) | |
elif [ -n "$1" ]; then | |
WINPATH=$(wslpath -w "$1") | |
else | |
WINPATH="" | |
fi | |
# Launch Sublime Text with Windows path, suppress stderr | |
/mnt/c/Users/suraj/Downloads/sublime_text_build_4200_x64/sublime_text.exe "$WINPATH" 2>/dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment